node tests: Remove module-pattern info in docs.

The example here wasn't useful or accurate any
more.
This commit is contained in:
Steve Howell
2020-03-22 11:30:14 +00:00
committed by Tim Abbott
parent 5b853cb2e5
commit 4888a2c7f9

View File

@@ -141,17 +141,6 @@ The test runner (`index.js`) automatically runs all .js files in the
`frontend_tests/node_tests` directory, so you can simply start editing a file
in that directory to create a new test.
The nodes tests rely on JS files that use the module pattern. For example, to
test the `foobar.js` file, you would first ensure that code like below
is at the bottom of `foobar.js`:
> if (typeof module !== 'undefined') {
> module.exports = foobar;
> }
This means `foobar.js` follow the CommonJS module pattern, so it can be
required in Node.js, which runs our tests.
## Coverage reports
You can automatically generate coverage reports for the JavaScript unit