chore: enforce file extensions on imports (#6202)

* chore: enforce file extensions on imports

To make our output agnostic it should include file extensions in the
output, as per the ESM spec. It's a bit odd for Node packages but makes
it easier to publish a browser build.
This commit is contained in:
Jack Franklin
2020-07-13 10:22:26 +01:00
committed by GitHub
parent 8d6e0d8a79
commit ffec2475d0
79 changed files with 356 additions and 306 deletions

View File

@@ -18,9 +18,9 @@ const base = require('./base');
module.exports = {
...base,
require: ['ts-node/register', './test/mocha-utils.ts'],
require: ['./test/mocha-ts-require', './test/mocha-utils.ts'],
spec: 'test/*.spec.ts',
extension: ['ts'],
extension: ['js', 'ts'],
parallel: process.env.CI && !process.env.COVERAGE,
// retry twice more, so we run each test up to 3 times if needed.
retries: process.env.CI ? 2 : 0,