- First, make sure
emscripten
is installed. Then go toemsdk
folder and runsource ./emsdk_env.
- Second, modify the
src/constant.ts
. Change constantWEBINIZER_HOME
to your real webinizer home directory. - Then in terminal, go to
WEBINIZER_HOME
directory and enternpm test
ornpm run test
to trigger the test running.
- Currently, we have 3 categories for unit tests, they are
action
,advisor
andbuilder
. - If you only want to run test case of one category, for example
action
, you can run commandnpm test -- --grep "action"
. - If you want to run multiple categories, you can use command
npm test -- --grep "(action|advisor|builder)"
to run 3 categories.
- If you only want to run one test case, for example
MainLoopAdvisorTest
, you can run commandnpm test -- --grep "MainLoopAdvisorTest"
. - If you want to run multiple test cases, you can use command
npm test -- --grep "(MainLoopAdvisorTest|InlineAsmAdvisorTest)"
to runMainLoopAdvisorTest
andInlineAsmAdvisorTest
.