Testing
March 8, 2023Less than 1 minute
Testing
Before testing, you should install dependencies:
npm i
You can run the most tests by
npm t
You can run parts of the test case separately:
- Linting:
npm run lint - Unit test case in Karma (modern Chromium, Firefox, WebKit (Playwright) and ancient WebKit (PhantomJS)):
npx run-s init bundle test-unit-karma - Unit test case in NodeJS:
npx run-s init bundle test-unit-node - Unit test case in Bun (it's not included in
npm tsince required installed Bun):npx run-s init bundle test-unit-bun - Test262 test case (it's not included to the default tests):
npx run-s init bundle-package test262 - Promises/A+ and ES6
Promisetest cases:npx run-s init test-promises - ECMAScript
Observabletest case:npx run-s init test-observables - CommonJS entry points tests:
npx run-s init test-entries core-js-compattools tests:npx run-s init test-compat-toolscore-js-buildertests:npx run-s init test-builder- If you want to run tests in a certain browser, at first, you should build packages and test bundles:
npx run-s init bundle - For running the global version of the unit test case, use this file:
tests/unit-browser/global.html - For running the pure version of the unit test case, use this file:
tests/unit-browser/pure.html