Skip to content

Commit 0783a4a

Browse files
authored
test: change jest.setTimeout from 20000 to 30000 (#1965)
1 parent 397bec8 commit 0783a4a

6 files changed

+1
-31
lines changed

setupTest.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
'use strict';
22

3-
jest.setTimeout(20000);
3+
jest.setTimeout(30000);

test/ContentBase.test.js

-6
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ describe('ContentBase', () => {
2222
describe('to directory', () => {
2323
const nestedFile = path.join(contentBasePublic, 'assets/example.txt');
2424

25-
jest.setTimeout(30000);
26-
2725
beforeAll((done) => {
2826
server = testServer.start(
2927
config,
@@ -66,8 +64,6 @@ describe('ContentBase', () => {
6664
});
6765

6866
describe('test ignoring node_modules folder by Default', () => {
69-
jest.setTimeout(30000);
70-
7167
beforeAll((done) => {
7268
server = testServer.start(config, {
7369
contentBase: contentBasePublic,
@@ -103,8 +99,6 @@ describe('ContentBase', () => {
10399
});
104100

105101
describe('test not ignoring node_modules folder', () => {
106-
jest.setTimeout(30000);
107-
108102
beforeAll((done) => {
109103
server = testServer.start(config, {
110104
contentBase: contentBasePublic,

test/LiveReload.test.js

-4
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ describe('liveReload', () => {
1515
describe('Test disabling live reloading', () => {
1616
const nestedFile = path.join(contentBasePublic, 'assets/example.txt');
1717

18-
jest.setTimeout(30000);
19-
2018
beforeAll((done) => {
2119
server = testServer.start(
2220
config,
@@ -64,8 +62,6 @@ describe('liveReload', () => {
6462
describe('Testing live reloading', () => {
6563
const nestedFile = path.join(contentBasePublic, 'assets/example.txt');
6664

67-
jest.setTimeout(30000);
68-
6965
beforeAll((done) => {
7066
server = testServer.start(
7167
config,

test/e2e/Client.test.js

-4
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ describe('reload', () => {
3636
});
3737

3838
describe('on browser client', () => {
39-
jest.setTimeout(30000);
40-
4139
it('should hot reload without page refresh', (done) => {
4240
runBrowser().then(({ page, browser }) => {
4341
let refreshed = false;
@@ -116,8 +114,6 @@ describe('reload', () => {
116114
});
117115

118116
describe('on browser client', () => {
119-
jest.setTimeout(30000);
120-
121117
it('should reload with page refresh', (done) => {
122118
runBrowser().then(({ page, browser }) => {
123119
let refreshed = false;

test/e2e/ClientOptions.test.js

-12
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ describe('Client code', () => {
4242
describe('behind a proxy', () => {
4343
let proxy;
4444

45-
jest.setTimeout(30000);
46-
4745
beforeAll(() => {
4846
proxy = startProxy(9000);
4947
});
@@ -99,8 +97,6 @@ describe('Client complex inline script path', () => {
9997
afterAll(testServer.close);
10098

10199
describe('browser client', () => {
102-
jest.setTimeout(30000);
103-
104100
it('uses the correct public hostname and sockPath', (done) => {
105101
runBrowser().then(({ page, browser }) => {
106102
page
@@ -137,8 +133,6 @@ describe('Client complex inline script path with sockPort', () => {
137133
afterAll(testServer.close);
138134

139135
describe('browser client', () => {
140-
jest.setTimeout(30000);
141-
142136
it('uses the correct sockPort', (done) => {
143137
runBrowser().then(({ page, browser }) => {
144138
page
@@ -177,8 +171,6 @@ describe('Client complex inline script path with sockPort, no sockPath', () => {
177171
afterAll(testServer.close);
178172

179173
describe('browser client', () => {
180-
jest.setTimeout(30000);
181-
182174
it('uses the correct sockPort and sockPath', (done) => {
183175
runBrowser().then(({ page, browser }) => {
184176
page
@@ -212,8 +204,6 @@ describe('Client complex inline script path with sockHost', () => {
212204
afterAll(testServer.close);
213205

214206
describe('browser client', () => {
215-
jest.setTimeout(30000);
216-
217207
it('uses the correct sockHost', (done) => {
218208
runBrowser().then(({ page, browser }) => {
219209
page
@@ -231,8 +221,6 @@ describe('Client complex inline script path with sockHost', () => {
231221
});
232222

233223
describe('Client console.log', () => {
234-
jest.setTimeout(30000);
235-
236224
const baseOptions = {
237225
port: 9000,
238226
host: '0.0.0.0',

test/e2e/ProvidePlugin.test.js

-4
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ describe('ProvidePlugin', () => {
2121
afterAll(testServer.close);
2222

2323
describe('on browser client', () => {
24-
jest.setTimeout(30000);
25-
2624
it('should inject SockJS client implementation', (done) => {
2725
runBrowser().then(({ page, browser }) => {
2826
page.waitForNavigation({ waitUntil: 'load' }).then(() => {
@@ -57,8 +55,6 @@ describe('ProvidePlugin', () => {
5755
afterAll(testServer.close);
5856

5957
describe('on browser client', () => {
60-
jest.setTimeout(30000);
61-
6258
it('should not inject client implementation', (done) => {
6359
runBrowser().then(({ page, browser }) => {
6460
page.waitForNavigation({ waitUntil: 'load' }).then(() => {

0 commit comments

Comments
 (0)