-
Notifications
You must be signed in to change notification settings - Fork 9
Development Scripts
Aaron Hardy edited this page Nov 11, 2020
·
1 revision
Several npm scripts have been provided for assisting in development. Each script can be run by navigating to the cloned repository directory in a terminal and executing npm run scriptname
where scriptname
is the name of the script you would like to run. The most useful scripts are as follows:
-
package
Builds and packages the extension to a zip file ready to be uploaded to Launch. -
upload
Same aspackage
but also uploads the extension package to Launch. -
dev
Spins up a sandbox where you can manually test the extension. More details about the sandbox can be found here. -
lint
Analyzes code for potential errors. -
format
Formats code to match agreed-upon style guidelines. -
test:unit
Runs unit tests against source files. Unit tests can be found in thetest/unit
directory. -
test:unit:coverage
Same astest:unit
, but will also produce a coverage report. -
test:unit:watch
Same astest:unit
, but will re-run the tests as you change source files or test files. -
test:unit:watch:chrome
Same astest:watch
, but will run the tests inside of Chrome (non-headless) for easier debugging. -
test:functional
Runs functional tests against source files. Functional tests can be found in thetest/functional
directory. -
test:functional:watch
Same astest:functional
, but will allow you to quickly re-run tests as changes are made. -
test:functional:watch:debug
Same astest:functional:watch
, but will allow you to debug "server-side" TestCafe code. -
test
Runs unit and functional tests against source files. Tests can be found in thetest
directory.
When you attempt to commit code changes, several of the above tasks will be run automatically to help ensure that your changes pass tests and are consistent with agreed-upon standards.