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

deno test doesn't work on subdirs #569

Closed
ry opened this issue Aug 22, 2019 · 2 comments · Fixed by #574
Closed

deno test doesn't work on subdirs #569

ry opened this issue Aug 22, 2019 · 2 comments · Fixed by #574

Comments

@ry
Copy link
Member

ry commented Aug 22, 2019

~/src/deno_std> deno test ./fmt/
Found 4 matching test files.
error: Uncaught SyntaxError: Unexpected token '*'
► file:///Users/rld/src/deno_std/fmt/TODO:2:1

2 * "native" formatting, json, arrays, object/structs, functions ...
  ^

@bartlomieju
Copy link
Member

I don't think it's a bug. ./fmt is converted to a regex to match files during walk() and it causes to match all files in fmt/ directory.

Actually the error is the same as in #568 - importing non-JS file. For good measure we can always only match .js and .ts files, but it may be surprising that some files are omitted. Anyway... deno test should definitely be as ergonomic as possible, we should also check how other test runners handle that.

@bartlomieju
Copy link
Member

Nevermind my previous comment. This issue will be fixed in #574 as well. Test runner will import all files from that directory obviously, and only some of them contain tests 👍

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 a pull request may close this issue.

2 participants