Skip to content

Commit d4f6c3c

Browse files
committed
add test
1 parent 22ea281 commit d4f6c3c

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
exports.$Enums = {};
2+
exports.AccessLevel = exports.$Enums.AccessLevel = {
3+
TEST: 'TEST',
4+
};

packages/commonjs/test/test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,15 @@ test('import CommonJS module with esm property should get default export ', asyn
294294
const result2 = await executeBundle(bundle2, avaAssertions);
295295
expect(result2.error.message).toBe('libExports is not a function');
296296
});
297+
test('test named exports from cjs', async (t) => {
298+
const bundle = await rollup({
299+
input: 'fixtures/samples/named-cjs-exports/main.cjs',
300+
plugins: [commonjs()]
301+
});
302+
303+
t.plan(3);
304+
await testBundle(t, bundle);
305+
});
297306
test('identifies named exports from object literals', async () => {
298307
const bundle = await rollup({
299308
input: 'fixtures/samples/named-exports-from-object-literal/main.js',

0 commit comments

Comments
 (0)