| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Review requested:
|
Sorry, something went wrong.
|
some examples: describe('1', () => {
it('2');
describe('3', () => {
it('4');
describe('5', () => {
it('6');
it.only('7');
});
});
});===> ▶ 1
▶ 3
▶ 5
✔ 7 (0.30825ms)
▶ 5 (0.813458ms)
▶ 3 (1.103583ms)
▶ 1 (1.578209ms)
describe('1', () => {
it('2');
describe.only('3', () => {
it('4');
describe('5', () => {
it('6');
it('7');
});
});
});===> ▶ 1
▶ 3
✔ 4 (0.414666ms)
▶ 5
✔ 6 (0.070375ms)
✔ 7 (0.112041ms)
▶ 5 (0.339458ms)
▶ 3 (1.070458ms)
▶ 1 (1.617208ms)
etc |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM, but it's probably worth updating some docs for this.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
Can you add a test that before and after hooks are not running for unfocused suites? IIRC they do run when there are no tests in describe while I think they shouldn't in this case
Sorry, something went wrong.
|
@rluvaton can you add these tests in a follow-up PR?. I am not sure what an unfocused suite is |
Sorry, something went wrong.
|
sure (what I meant with unfocused are suites that or not in the only scope) |
Sorry, something went wrong.
|
FWIW this code describe('describe 1', () => {
before(() => console.log('before describe 1'))
beforeEach(() => console.log('beforeEach describe 1'))
it.only(async () => {
console.log(1);
})
it('no', () => {});
afterEach(() => console.log('afterEach describe 1'))
after(() => console.log('after describe 1'))
})
describe('describe 2', () => {
before(() => console.log('before describe 2'))
beforeEach(() => console.log('beforeEach describe 2'))
it('no', () => {});
afterEach(() => console.log('afterEach describe 2'))
after(() => console.log('after describe 2'))
})outputs before describe 1
beforeEach describe 1
1
afterEach describe 1
after describe 1
▶ describe 1
✔ <anonymous> (0.769792ms)
▶ describe 1 (5.330458ms)
which seems ok to me |
Sorry, something went wrong.
|
Can you please create a manual backport to v20x? |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Supersedes #48932
this fixes two major issues with describe that will now run regardless of it not being marked with only:
this aligns the behavior with other test runners I have compared with