Skip to main content

Testing

Less than 1 minutedevelopment

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 t since required installed Bun):
    npx run-s init bundle test-unit-bun
    
  • Test262open in new window test case (it's not included to the default tests):
    npx run-s init bundle-package test262
    
  • Promises/A+open in new window and ES6 Promiseopen in new window test cases:
    npx run-s init test-promises
    
  • ECMAScript Observable test caseopen in new window:
    npx run-s init test-observables
    
  • CommonJS entry points tests:
    npx run-s init test-entries
    
  • core-js-compat tools tests:
    npx run-s init test-compat-tools
    
  • core-js-builder tests:
    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