Skip to content

Commit

Permalink
Interop test case (#667)
Browse files Browse the repository at this point in the history
* interop test case

* fixup test

* include fixture
  • Loading branch information
guybedford committed Mar 19, 2021
1 parent f3fd47b commit 8f25102
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/cli.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
[
{
args: ["run", "test/fixtures/interop-test.mjs"],
expect: { code: 0 }
},
{
args: ["run", "test/integration/test.ts"],
expect: { code: 0 }
Expand Down
7 changes: 7 additions & 0 deletions test/fixtures/interop-test.mjs
Original file line number Diff line number Diff line change
@@ -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');
5 changes: 5 additions & 0 deletions test/fixtures/interop.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Object.defineProperty(exports, '__esModule', { value: true });
exports.s = 's';
exports['com' + 'puted'] = 'y';
exports.default = 'z';

0 comments on commit 8f25102

Please sign in to comment.