Skip to content

Commit

Permalink
Adapt test assertion
Browse files Browse the repository at this point in the history
While the error message has a different variable name, the point of
the test is that we get an error.
  • Loading branch information
lukastaegert committed Jan 18, 2024
1 parent 15c32f8 commit 1808f4b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/commonjs/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,12 @@ test('converts a CommonJS module with custom file extension', async (t) => {
t.is((await executeBundle(bundle, t)).exports, 42);
});

test('import CommonJS module with esm property should get default export (strictRequires: "auto")', async (t) => {
test('import CommonJS module with esm property should get default export ', async (t) => {
const bundle = await rollup({
input: 'fixtures/samples/cjs-with-esm-property/main.js',
plugins: [
commonjs({
defaultIsModuleExports: 'auto',
strictRequires: 'auto'
defaultIsModuleExports: 'auto'
})
]
});
Expand All @@ -282,13 +281,12 @@ test('import CommonJS module with esm property should get default export (strict
input: 'fixtures/samples/cjs-with-esm-property/main.js',
plugins: [
commonjs({
defaultIsModuleExports: true,
strictRequires: 'auto'
defaultIsModuleExports: true
})
]
});
const result2 = await executeBundle(bundle2, t);
t.is(result2.error.message, 'lib is not a function');
t.is(result2.error.message, 'libExports is not a function');
});

test('identifies named exports from object literals', async (t) => {
Expand Down

0 comments on commit 1808f4b

Please sign in to comment.