Once the above steps are completed, run the following commands from within webapp/
:
npm install
webapp/ has both lint tests and tests based on
web-component-test. There
are npm
aliases for many of the common tasks, listed below.
npm test
: This will run the linting task followed by the web-component-tester task.npm run lint
: This will run only the linting task.npm run lint-fix
: This will run the linting task with automatic lint fixing.npm run wct
: This will run only the web-component-tester task.npm run wctp
: This will run the web-component-tester task with the-p
flag to leave the browser open after the tests have completed.
When using npm run
, any additional flags or options will be passed to the
underlying command. For example, to run a specific test only on chrome:
npm run wct -l chrome path/to/test/test-file.html
To run web_components_test
in any platform, first start a Docker instance.
Once the instance is running, execute the following in another terminal:
source util/commands.sh
wptd_exec make web_components_test