You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
conste=newError("oh no!");e.stack="stack is gone";throwe;Deno.test({name: "fails outside the test",fn(){},});
prints the following:
Which makes it hard to figure out the error originated from c.test.js.
Admittedly I cheated a little here by removing the stack trace of the error, which would have shown c.test.js in the stack trace, so a more real world use case would be:
import{Importer}from"https://deno.land/x/[email protected]/mod.js";constimporter=newImporter(import.meta.url);awaitimporter.import("does/not/exist.js");Deno.test({name: "fails outside the test",fn(){},});
The rejected promise is created in a file other than the running test, causing the stack trace to never mention c.test.js.
At the moment the only way to figure out where the error originated is to gradually reduce the scope of the tests you're running, which could take pretty long depending on how many tests you have.
The text was updated successfully, but these errors were encountered:
Thanks for opening this issue. I discussed it last week with @dsherret that it's very unhelpful. I have an idea how to fix this, but that requires making test runner "more rusty", by moving some of the logic from JavaScript to Rust. It will be a bigger refactor, but we should tackle it.
For example:
prints the following:
Which makes it hard to figure out the error originated from
c.test.js
.Admittedly I cheated a little here by removing the stack trace of the error, which would have shown
c.test.js
in the stack trace, so a more real world use case would be:The rejected promise is created in a file other than the running test, causing the stack trace to never mention
c.test.js
.At the moment the only way to figure out where the error originated is to gradually reduce the scope of the tests you're running, which could take pretty long depending on how many tests you have.
The text was updated successfully, but these errors were encountered: