Closed
Description
What is the problem this feature will solve?
A test's progress can sometimes be crucial for the next one, if one of them fails, say like this:
let module;
let instance;
test("importing module", async () => {
module = await import("...");
});
test("using module feature 1", () => {
instance = new module.SomeExportedClass("arg1", { option: true });
});
test("request to API", async () => {
await instance.apiEndpoint({ ... });
});
While yes, if the library has checks, this would be pointless, but it would be better to have an option for the the rest of the tests to fail if one had failed.
What is the feature you are proposing to solve the problem?
Something like this:
test("test for myModule", { fastFail: true }, (t) => {
t("test that fails", () => {
// This should make the next tests to fail as well.
assert(false);
});
t("test that will never succeed", () => {
console.log("This won't log to the console.");
});
});
What alternatives have you considered?
No response