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
Merged

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

merged 1 commit into from
Aug 15, 2019

Conversation

bartlomieju
Copy link
Member

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.

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants