Skip to content
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

Port 'beforeAll on disabled test' fixed from jasmine #5051

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports[`should not run beforeall for disabled tests 2`] = `
Failed: Ran beforeAll for def

at ../../packages/jest-jasmine2/build/expectation_result_factory.js:49:427
at skip.test.js:6:19
at skip.test.js:8:19

"
`;
16 changes: 9 additions & 7 deletions integration_tests/beforeall-disabled/skip.test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
describe("abc", function() {
it("runs abc", function() {});
/* globals fail */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpojer yet another jasmine global... Can we add it to the jest global?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather just kill this one and provide a better API tbh.


describe('abc', () => {
it('runs abc', () => {});
});

describe("def", function() {
beforeAll(() => fail("Ran beforeAll for def"));
describe('def', () => {
beforeAll(() => fail('Ran beforeAll for def'));

it("does not run def", function() {
fail("ran def");
})
it('does not run def', () => {
fail('ran def');
});
});