diff --git a/e2e/__tests__/__snapshots__/nativeEsm.test.ts.snap b/e2e/__tests__/__snapshots__/nativeEsm.test.ts.snap index 4a6a74329208..7aa2b751b2f4 100644 --- a/e2e/__tests__/__snapshots__/nativeEsm.test.ts.snap +++ b/e2e/__tests__/__snapshots__/nativeEsm.test.ts.snap @@ -2,7 +2,7 @@ exports[`on node ^12.16.0 || >=13.0.0 runs test with native ESM 1`] = ` Test Suites: 1 passed, 1 total -Tests: 3 passed, 3 total +Tests: 4 passed, 4 total Snapshots: 0 total Time: <> Ran all test suites. diff --git a/e2e/native-esm/__tests__/native-esm.test.js b/e2e/native-esm/__tests__/native-esm.test.js index 0f7e54319151..4fde434ab166 100644 --- a/e2e/native-esm/__tests__/native-esm.test.js +++ b/e2e/native-esm/__tests__/native-esm.test.js @@ -38,3 +38,10 @@ test('should support importing node core modules', () => { type: 'module', }); }); + +test('dynamic import should work', async () => { + const {double: importedDouble} = await import('../index'); + + expect(importedDouble).toBe(double); + expect(importedDouble(1)).toBe(2); +});