Skip to content

Commit 5f23666

Browse files
test: Add a test for default export
1 parent ccc52c2 commit 5f23666

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/api-spec.js

+8
Original file line numberDiff line numberDiff line change
@@ -160,4 +160,12 @@ describe('api', function () {
160160
);
161161
return compDirs('test/input/packthis-object-prototype/', 'tmp/packthis-object-prototype');
162162
});
163+
it('should export all functions also in the default export', () => {
164+
const topLevelFunctions = Object.keys(asar).filter((key) => typeof asar[key] === 'function');
165+
const defaultExportFunctions = Object.keys(asar.default).filter(
166+
(key) => typeof asar.default[key] === 'function',
167+
);
168+
169+
assert.deepStrictEqual(topLevelFunctions, defaultExportFunctions);
170+
});
163171
});

0 commit comments

Comments
 (0)