Open pkb-pmj opened 1 year ago
To add to this, even just
Deno.test("valid", () => undefined);
throw "foo";
Will cause a panic.
@crowlKats I can't repeat this problem on latest canary. Perhaps it was fixed in https://github.com/denoland/deno/commit/1e0017d8fc3a7ed0dd5775196a861d46caea5c33?
Actually I just noticed that that "running tests" spins forever on the left in the bottom bar. So it seems that's still an issue.
Describe the bug
If I write a valid test and a test with an empty name and run either of them, the test never exits. Looking at Deno Language Server output, it seems to panic:
To Reproduce
Expected behavior
It should say what's wrong. When I run
deno test
, it correctly returns this:./src/scratch/api.ts (uncaught error) error: TypeError: The test name can't be empty Deno.test("", () => undefined); ^ at Object.test (deno:cli/js/40_testing.js:633:15) at file:///[...]/src/scratch/api.ts:180:6 This error was not caught from a test and caused the test runner to fail on the referenced module. It most likely originated from a dangling promise, event/timeout handler or top-level code.
FAILURES
./src/scratch/api.ts (uncaught error)
FAILED | 0 passed | 2 failed (21ms)
error: Test failed