intern icon indicating copy to clipboard operation
intern copied to clipboard

dojo 1 loader does not support globs

Open jamime opened this issue 6 years ago • 0 comments

Expected behavior

When using a glob "suites": "tests/unit/**/*.js", all tests that match should be run.

Current behavior

tests/unit/example/example.js is loaded. The dojo loader treats this as an absolute path and loads it from the current url http://localhost:9000/_intern/tests/unit/example/example.js https://github.com/theintern/intern/blob/f56177f85a3ee6ff123fb6a7a6ebfa35923dd885/src/loaders/dojo.ts#L31

Possible solution

Change /src/loaders/dojo.ts to remove .js file extension. This will fallback to mid resolution which are relative to the baseUrl.

Environment

Intern version: 4.1.5 Node version: v9.7.1 NPM version: 5.6.0 Browser version: Chrome 65

jamime avatar Mar 12 '18 14:03 jamime