Skip to content

Commit

Permalink
test: Add a test for default export
Browse files Browse the repository at this point in the history
  • Loading branch information
felixrieseberg committed Sep 10, 2024
1 parent ccc52c2 commit 5f23666
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/api-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,12 @@ describe('api', function () {
);
return compDirs('test/input/packthis-object-prototype/', 'tmp/packthis-object-prototype');
});
it('should export all functions also in the default export', () => {
const topLevelFunctions = Object.keys(asar).filter((key) => typeof asar[key] === 'function');
const defaultExportFunctions = Object.keys(asar.default).filter(
(key) => typeof asar.default[key] === 'function',
);

assert.deepStrictEqual(topLevelFunctions, defaultExportFunctions);
});
});

0 comments on commit 5f23666

Please sign in to comment.