-
Notifications
You must be signed in to change notification settings - Fork 68
Add beforeAll/afterAll hooks #1147
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 beforeAll/afterAll hooks #1147
Conversation
commit: |
| }); | ||
| }); | ||
|
|
||
| describe("hooks beforeAll/afterAll", () => { |
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.
Here, it was possible to simply reduce duplication:
["beforeAll", "afterAll"].forEach(hookName => {
describe(`hook ${hookName}`, () => {
it('...', () => {
const readConfig = { [hookName]: "String" };
Config.read.returns(readConfig);
assert.throws(() => createConfig(), Error, `"${hookName}" must be a function`);
});
// ...
});
});
| prepareBrowser: null, | ||
| prepareEnvironment: null, | ||
| beforeAll: null, | ||
| afterAll: null, |
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.
Where I can find docs about this new methods?
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.
Docs will be here gemini-testing/testplane-docs#89 with docs for saveState/restoreState
| ); | ||
|
|
||
| if (this.config.afterAll) { | ||
| await this.config.afterAll.call({ config: this.config }, { config: this.config }); |
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.
Why we didn't write tests for this code?
No description provided.