Skip to content

Latest commit

 

History

History
 
 

webapp

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

wpt.fyi

Testing webapp/

Prerequisites:

  1. Setting up your environment
  2. Running locally

Once the above steps are completed, run the following commands from within webapp/:

npm install

Test commands

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

Running web_components_test

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