Skip to content

Commit

Permalink
test: add test to validate static property default
Browse files Browse the repository at this point in the history
  • Loading branch information
miwnwski committed Jan 4, 2021
1 parent 96dc600 commit 2fbed91
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/load-with-esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,14 @@ describe('Load with esm', () => {
assert.strictEqual(exported.size, required.size);
assert.strictEqual([...exported].every(property => required.has(property)), true);
});

it('CommonJS exports default property', async() => {
const required = require('../');
assert.strictEqual(required.hasOwnProperty('default'), true);
});

it('CommonJS exports default property referencing self', async() => {
const required = require('../');
assert.strictEqual(required.default, required);
});
});

0 comments on commit 2fbed91

Please sign in to comment.