Skip to content

Conversation

@sonic16x
Copy link
Contributor

No description provided.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 10, 2025

Open in StackBlitz

npm i https://pkg.pr.new/gemini-testing/testplane@1147

commit: 83f1270

@sonic16x sonic16x merged commit 6d77ddd into master Oct 14, 2025
5 checks passed
@sonic16x sonic16x deleted the users/rocketraccoon/TESTPLANE-738.before-after-all-hooks branch October 14, 2025 08:40
});
});

describe("hooks beforeAll/afterAll", () => {
Copy link
Member

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,
Copy link
Member

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?

Copy link
Contributor Author

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 });
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants