diff --git a/e2e/__tests__/__snapshots__/nativeEsm.test.ts.snap b/e2e/__tests__/__snapshots__/nativeEsm.test.ts.snap index e5566df1fbbd..f336c89b96aa 100644 --- a/e2e/__tests__/__snapshots__/nativeEsm.test.ts.snap +++ b/e2e/__tests__/__snapshots__/nativeEsm.test.ts.snap @@ -10,7 +10,7 @@ Ran all test suites matching /native-esm.tla.test.js/i. exports[`on node ^12.16.0 || >=13.7.0 runs test with native ESM 1`] = ` Test Suites: 1 passed, 1 total -Tests: 16 passed, 16 total +Tests: 17 passed, 17 total Snapshots: 0 total Time: <> Ran all test suites matching /native-esm.test.js/i. diff --git a/e2e/native-esm/__tests__/native-esm.test.js b/e2e/native-esm/__tests__/native-esm.test.js index fb2db4d6d7d8..ae2dcc2fa52d 100644 --- a/e2e/native-esm/__tests__/native-esm.test.js +++ b/e2e/native-esm/__tests__/native-esm.test.js @@ -21,6 +21,7 @@ import staticImportedStatefulWithAnotherQuery from '../stateful.mjs?query=2'; /* eslint-enable */ import {double} from '../index'; import defaultFromCjs, {namedFunction} from '../namedExport.cjs'; +import {bag} from '../namespaceExport.js'; test('should have correct import.meta', () => { expect(typeof require).toBe('undefined'); @@ -151,3 +152,7 @@ test('supports file urls as imports', async () => { expect(dynamic.default).toBe(staticImportedStateful); }); + +test('namespace export', () => { + expect(bag.double).toBe(double); +}); diff --git a/e2e/native-esm/namespaceExport.js b/e2e/native-esm/namespaceExport.js new file mode 100644 index 000000000000..3210e61188f8 --- /dev/null +++ b/e2e/native-esm/namespaceExport.js @@ -0,0 +1,8 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +export * as bag from './index.js';