-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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" should run all the functions named test* in current directory #20
Comments
Can't it be up to the community to create something that runs all files ending with _test.js? This seems a bit unnecessary... |
I think it’s better to have these thing prescribed - it’s very arbitrary and better if everyone just uses the same system |
It also wouldn't preclude someone from running some other test harness or some other pattern, they simply wouldn't execute |
I think it's good if everyone uses the same system, but we shouldn't force the use of the |
Attempting to implement this: robbym@d4b66fb How does one get stuff, like all the function names in a file, from the C API? |
@robbym Yeah functionality is not there yet. Hold off on this for a bit... We've got one more sprint and then we'll be up and running on the prototype's runtime. It'll make more sense to talk about it once we've got that working. |
So, you can do this if the function is exported: // foo_test.ts
export function testFoo() {
console.log("foo");
}
// test.ts
(async () => {
const name = "foo_test.ts";
const t = await import(name);
t.testFoo();
})(); Is there a way to access these if the function is not exported? Edit: One possible solution is to support users grouping their test function in a class that's Edit2: I think there's a nice way to do this with the current |
@ry close in favor of testing module in standard library? |
Once |
This is still desired. @hayd looking forward to it. |
Nice work :D |
Supports #[serde] parameters in argument and return position.
And only in files that end in
_test.ts
.Example:
The text was updated successfully, but these errors were encountered: