-
Notifications
You must be signed in to change notification settings - Fork 5
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
Skip: Show Ignored in Output? #16
Comments
I like this |
Just a thing that would be interesting, to show the message as |
Might be possible, like we could add It might look like this:
|
Working on it, and @Guergeiro this is how it displays, without me doing We could probably just leave it like that, as it actually already shows it's ignored (but not "skipped") |
I'm okay with being ignored instead of skipped. But if it's displaying yellow without we telling it to be yellow, it means we are depending on Deno, and we all know how Deno is breaking things left and right. I would force our yellow colour. |
Hmm... idk, because by that, we may as well do the same for "ok" and "FAILED", as these display green/red without us doing anything So i'd probably have to disagree as i think it add unnecessary work? Should the time arise where they remove the colours we could address it then? Though unsure how we would do that as of now as we rely on the deno test runner to display the "ok/FAILED/ignored" |
Yeah, that's a good point. Let's leave it at that. |
It'd be great is we could have more control though 👍 |
Don't know if it'll be possible to do
Where you see
I can't think of a way to figure it out, so i'm thinking along the lines of maybe doing. something like: Rhum.testPlan("name", ({ skip: true }) => {
...
})
// or
Rhum,testPlan("name", () => {
...
}, { skip: true }) |
Worked on it, but giving up as it's too time consuming to fix the assertions. In a nutshell:
if (this.passed_in_test_plan && this.passed_in_test_suite) { // is a test case being skipped
this.plan.suites[this.passed_in_test_suite].cases!.push({
name,
new_name: this.formatTestCaseName(name, true),
testFn: cb,
skip: true
});
} else if (this.passed_in_test_plan) { // is a test suite being skipped
this.passed_in_test_suite = name;
this.plan.suites![name] = { cases: [], skip: true };
cb();
} else {
// is a test plan being skipped
this.passed_in_test_suite = ""; // New plan
this.passed_in_test_plan = name;
this.plan.skip = true;
cb();
}
const skipTest =
c.skip === true || this.plan.skip === true || this.plan.suites[suiteName].skip === true
if (Deno.env.get("CI") === "true") {
await Deno.test({
name: c.new_name,
ignore: skipTest,
async fn(): Promise<void> {
await hookAttachedTestFn()
}
})
} else {
await Deno.test({
name: c.new_name,
ignore: skipTest,
async fn(): Promise<void> {
//Deno.stdout.writeSync(encoder.encode(c.new_name))
await hookAttachedTestFn()
}
})
|
Made an issue for Deno in hopes of getting ignore for the test definition. we. use: denoland/deno#7173 |
Note: it might not be possible with how. we use
Deno.test
. Maybe we could add custom output outselves to say it was skipped (but it might still show as OK), or (and i really dont want to do this), change ourDeno.test
signature toDeno.test({name: ..., ignore: ..., async fn() ...})
Summary
What: Modify the
skip
method inRhumRunner
so it stills callsDeno.test
, butignore: true
is passed in. This would probably require a change toITestCase
to set if a test should be ignored. Defaults to falseWhy: I think it would be good that the user would see the test is being ignored (like now
deno test
currently displays it)Acceptance Criteria
.skip
methodtests/integration/skip.ts
Example Pseudo Code (for implementation)
The text was updated successfully, but these errors were encountered: