-
Notifications
You must be signed in to change notification settings - Fork 125
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
Add support for retries for CodeceptJS #686
Conversation
Change lint to allow underscore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks awesome 🔥 !!!!! can i also ask you to write at least one test for this scenario? If its tooo hard right now ill do
@vovsemenv could you please take a look? |
Hi @vovsemenv may you have in mind when it would be released |
@@ -0,0 +1,47 @@ | |||
const allurePlugin = require( "../src/index.ts"); | |||
describe('handleRetries', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess i need simplify this test later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vovsemenv could you please run build again ?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks fine for now but i imagine we can do it like this
import { expect } from "@jest/globals";
import { runTests } from "./utils/run-tests";
test("retries", async () => {
const res = await runTests({
files: {
"retries.test.js": /* js */ `
Feature("retries-feature");
Scenario("Failing feature", ({ I }) => {
//@ts-ignore
if (!global.shouldPass) {
throw new Error("Test Fail");
}
//@ts-ignore
global.shouldPass = true;
}).retry(1);
`,
},
});
expect(res.tests.length).toBe(2);
expect(res.tests).toEqual(
expect.arrayContaining([
expect.objectContaining({
fullName: "retries.test.js#Failing feature",
}),
]),
);
});
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fix #685
Change lint to allow underscore
Context
Checklist