Skip to content

Commit

Permalink
fix (#1642)
Browse files Browse the repository at this point in the history
  • Loading branch information
cspotcode authored Feb 13, 2022
1 parent 751c0df commit abc616e
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/test/esm-loader.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,23 @@ if (nodeSupportsImportAssertions) {
'parentURL',
]);
} else if (json.loadContextKeys) {
expect(json.loadContextKeys).toEqual(['format', 'importAssertions']);
try {
expect(json.loadContextKeys).toEqual([
'format',
'importAssertions',
]);
} catch (e) {
// HACK for https://github.com/TypeStrong/ts-node/issues/1641
if (process.version.includes('nightly')) {
expect(json.loadContextKeys).toEqual([
'format',
'importAssertions',
'parentURL',
]);
} else {
throw e;
}
}
} else {
throw new Error('Unexpected stdout in test.');
}
Expand Down

0 comments on commit abc616e

Please sign in to comment.