Skip to content
This repository was archived by the owner on Apr 16, 2020. It is now read-only.

Commit 337063e

Browse files
committed
fixup: tests
1 parent 5c81e3d commit 337063e

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

lib/internal/modules/esm/translators.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ translators.set('json', async (url) => {
125125
CJSModule._cache[modulePath] = module;
126126
return createDynamicModule(['default'], url, (reflect) => {
127127
debug(`Parsing JSONModule ${url}`);
128-
reflect.exports.default.set(module.exports);
129-
128+
reflect.exports.default.set(module.exports);
130129
});
131130
});
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
// Flags: --experimental-modules --experimental-json-modules
22
/* eslint-disable node-core/required-modules */
33
import '../common/index.mjs';
4-
import {strictEqual} from 'assert';
4+
import { strictEqual } from 'assert';
55

66
import mod from '../fixtures/es-modules/json-cache/mod.cjs';
77
import another from '../fixtures/es-modules/json-cache/another.cjs';
88
import test from '../fixtures/es-modules/json-cache/test.json';
99

10-
1110
strictEqual(mod.one, 1);
1211
strictEqual(another.one, 'zalgo');
1312
strictEqual(test.one, 'it comes');

test/es-module/test-esm-json.mjs

-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,5 @@ import '../common/index.mjs';
55
import { strictEqual } from 'assert';
66

77
import secret from '../fixtures/experimental.json';
8-
import * as namespace from '../fixtures/experimental.json';
98

109
strictEqual(secret.ofLife, 42);
11-
strictEqual(namespace.ofLife, undefined);
12-
strictEqual(namespace.default.ofLife, 42);

0 commit comments

Comments
 (0)