Skip to main content

Testing

make test will run the node-based tests. By default it runs tests on files in every supported format. To test a specific file type, set FMTS to the format you want to test. Feature-specific tests are available with make test_misc

$ make test_misc   # run core tests
$ make test # run full tests

To enable all errors, set the environment variable WTF=1:

$ make test        # run full tests
$ WTF=1 make test # enable all error messages

flow and eslint checks are available:

$ make lint        # eslint checks
$ make tslint # check TS definitions

Tested Environments

(click to show)

Browsers

  • IE 6/7/8/9/10/11 (IE 6-9 require shims)
  • Chrome 26+ (including Android 6.0+)
  • Safari 8+ (Desktop) and Safari 10+ (iOS)
  • Edge 13-18 and 79+
  • FF Latest

The automated browser tests seek to test the latest patch version of each major release of Chromium ending in 0 (starting from Chrome 30).

Edge originally was an independent browser, becoming a Chromium fork in version 79. Since the new releases should be nearly identical to the Chrome counterpart, the Edge tests are run on major releases ending in 5 (starting from Edge 85).

Server Platforms

  • NodeJS 0.8, 0.10, 0.12, and every major version starting from 4
  • io.js 1/2/3
  • Deno latest

The test suite also includes tests for various time zones. To change the timezone locally, set the TZ environment variable:

env TZ="Asia/Kolkata" WTF=1 make test_misc

Test Files

Test files are housed in another repo.

Running make init will refresh the test_files submodule and get the files. The "OS-Specific Setup" includes notes for installing the required dependencies.