-
Notifications
You must be signed in to change notification settings - Fork 641
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
describe.skip does not skip assertions in block #6233
Comments
Thanks for the quick fix. In the meantime I had a look at the same issue in Jest, and it's WAI:
I'm not advocating we keep Jest compatibility, but wondering if fixing this behavior might break something else. Also, https://jsr.io/@std/testing/doc/bdd/~/describe.skip is somewhat vague about what "skip" does:
What exactly is that What does "registering" means? Should some code inside still be... registered, just not run? |
let skipTestingThisVariable: string;
describe.skip("skip everything in here", () => {
assertExists(skipTestingThisVariable);
it("should work", () => {
assertExists(true);
});
}); will be registered as: Deno.test({ name: "skip everything in here", ignore: true }, (t) => {
assertExists(skipTestingThisVariable);
t.step("should work", () => {
assertExists(true);
});
}); So,
|
@IgorM867 thanks for the clarification. Given your knowledge of Deno test internals, I wonder if you could help bring BDD style testing to VS Code? This would be a breakthrough :) |
I expect that skipped
describe
blocks don't run any code inside, and especially not assertions.Steps to Reproduce
denobug.test.ts
deno test denobug.test.ts
Expected behavior
The test should be ignored. If the
assertExists(skipTestingThisVariable);
is moved into theit
, then it's correctly ignoredEnvironment
The text was updated successfully, but these errors were encountered: