diff --git a/test/cli.js b/test/cli.js index 89dee95b..f5f64b03 100644 --- a/test/cli.js +++ b/test/cli.js @@ -1,4 +1,8 @@ [ + { + args: ["run", "test/fixtures/interop-test.mjs"], + expect: { code: 0 } + }, { args: ["run", "test/integration/test.ts"], expect: { code: 0 } diff --git a/test/fixtures/interop-test.mjs b/test/fixtures/interop-test.mjs new file mode 100644 index 00000000..3dae82a0 --- /dev/null +++ b/test/fixtures/interop-test.mjs @@ -0,0 +1,7 @@ +import { strictEqual } from 'assert'; +import * as z from './interop.cjs'; + +strictEqual(z.s, 's'); +strictEqual(z.__esModule, true); +strictEqual(z.default.default, 'z'); +strictEqual(z.default.s, 's'); diff --git a/test/fixtures/interop.cjs b/test/fixtures/interop.cjs new file mode 100644 index 00000000..f5b8ac30 --- /dev/null +++ b/test/fixtures/interop.cjs @@ -0,0 +1,5 @@ +Object.defineProperty(exports, '__esModule', { value: true }); +exports.s = 's'; +exports['com' + 'puted'] = 'y'; +exports.default = 'z'; +