Skip to content

Commit

Permalink
fix failure in linux (low ms have problem)
Browse files Browse the repository at this point in the history
  • Loading branch information
rluvaton committed Jul 30, 2023
1 parent 438831e commit da8e5fd
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ describe('before each timeout', () => {

beforeEach(async () => {
if (i++ === 0) {
console.log('gonna timeout')
await setTimeout(50);
console.log('gonna timeout');
await setTimeout(700);
return;
}
console.log('not gonna timeout');
}, {timeout: 20});
}, {timeout: 500});

test('first describe first test', () => {
console.log('before each test first ' + i);
Expand All @@ -27,14 +27,14 @@ describe('before each timeout', () => {
describe('after each timeout', () => {
let i = 0;

afterEach(async () => {
afterEach(async function afterEach1() {
if (i++ === 0) {
console.log('gonna timeout')
await setTimeout(50);
console.log('gonna timeout');
await setTimeout(700);
return;
}
console.log('not gonna timeout');
}, {timeout: 20});
}, {timeout: 500});

test('second describe first test', () => {
console.log('after each test first ' + i);
Expand Down

0 comments on commit da8e5fd

Please sign in to comment.