Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add file:// prefix for imports in test runner #564

Merged
merged 1 commit into from Aug 15, 2019

Conversation

@bartlomieju
Copy link
Contributor

commented Aug 15, 2019

Otherwise test runner is not working properly when requested from remote server:

// run in root of deno_std repo
$ deno -A https://deno.land/std/testing/runner.ts 
Download https://deno.land/Users/biwanczuk/dev/deno_std/strings/pad_test.ts
error: Uncaught TypeError: Import 'https://deno.land/Users/biwanczuk/dev/deno_std/strings/pad_test.ts' failed: 404 Not Found

It's caused because base for specifier is a remote script (https://deno.land/std/testing/runner.ts) and found test files are absolute paths (/Users/biwanczuk/dev/deno_std/strings/pad_test.ts).

I explicitly added file:// prefix to import, that should resolve the problem.

@ry
ry approved these changes Aug 15, 2019
Copy link
Contributor

left a comment

LGTM
There’s another thread where people are discussing the validity of exactly this case... can’t find a link right now.. but you might want to chime in and mention this situation.

@ry ry merged commit 15afc61 into denoland:master Aug 15, 2019

5 checks passed

denoland.deno_std Build #20190815.2 succeeded
Details
denoland.deno_std (Linux) Linux succeeded
Details
denoland.deno_std (Mac) Mac succeeded
Details
denoland.deno_std (Windows) Windows succeeded
Details
license/cla Contributor License Agreement is signed.
Details

@bartlomieju bartlomieju deleted the bartlomieju:fix-test_runner_dyn_import branch Aug 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.