Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Started adding tests
  • Loading branch information
robtpaton authored and Trott committed Nov 1, 2017
commit f121d97c37db677eb8002982831c21e4e4ca761f
14 changes: 14 additions & 0 deletions test/es-module/test-esm-loader-modulemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,18 @@ const moduleMap = new ModuleMap();

assert.throws(() => {
moduleMap.get(1);
}, 'TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string');

assert.doesNotThrow(() => {
moduleMap.get('somestring');
});

assert.throws(() => {
moduleMap.has(1);
}, 'TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string');

assert.doesNotThrow(() => {
moduleMap.has('somestring');
});