Skip to content

Clean up internal test/ directory structure #1511

@Krinkle

Description

@Krinkle

We currently have many ways we run unit tests:

  1. In a browser (via Headless Chromium, grunt-contrib-qunit).
  2. In a browser with a Web Worker (via Headless Chromium, grunt-contrib-qunit).
  3. In Node.js, plainly (via a custom Grunt task).
  4. In Node.js using the QUnit CLI.
  5. In SpiderMonkey (via mozjs).

Outcome for this issue:

  • To the extent possible, have the same these three test runners automatically share a common base list of test suites. Or, have build script that can keep them in sync. Or, have a small test that just tells us whether they are in sync and add that to npm test.
  • In the repository, organise tests such that it is easy to spot which tests are common, which specific to browser, and which specific to CLI. Perhaps by giving those three use cases their own subdirectory, or by a mark in file name, or file comment.

For later:

  • Walk through the tests that don't run in all three and determine whether there is a good reason for it, and document that reason. And if there isn't one, have it run in all three. From a quick check it seems that a big chunk of tests only ever run in the browser and in plain Node. The CLI test run seems limited to only CLI-specific stuff mostly. It'd be good to have the bulk of the tests run through there as well.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions