Skip to content

Commit 14ad108

Browse files
committed
test: add more cases
1 parent 470b6cf commit 14ad108

File tree

3 files changed

+129
-0
lines changed

3 files changed

+129
-0
lines changed

test/server/__snapshots__/watchFiles-option.test.js.snap.webpack4

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3+
exports[`'watchFiles' option should work with options {"interval":400,"poll":200} should pass correct options to chokidar config 1`] = `
4+
Object {
5+
"alwaysStat": true,
6+
"atomic": false,
7+
"followSymlinks": false,
8+
"ignoreInitial": true,
9+
"ignorePermissionErrors": true,
10+
"ignored": undefined,
11+
"interval": 400,
12+
"persistent": true,
13+
"usePolling": true,
14+
}
15+
`;
16+
317
exports[`'watchFiles' option should work with options {"poll":200} should pass correct options to chokidar config 1`] = `
418
Object {
519
"alwaysStat": true,
@@ -28,6 +42,34 @@ Object {
2842
}
2943
`;
3044

45+
exports[`'watchFiles' option should work with options {"usePolling":false,"interval":200,"poll":400} should pass correct options to chokidar config 1`] = `
46+
Object {
47+
"alwaysStat": true,
48+
"atomic": false,
49+
"followSymlinks": false,
50+
"ignoreInitial": true,
51+
"ignorePermissionErrors": true,
52+
"ignored": undefined,
53+
"interval": 200,
54+
"persistent": true,
55+
"usePolling": false,
56+
}
57+
`;
58+
59+
exports[`'watchFiles' option should work with options {"usePolling":false,"poll":200} should pass correct options to chokidar config 1`] = `
60+
Object {
61+
"alwaysStat": true,
62+
"atomic": false,
63+
"followSymlinks": false,
64+
"ignoreInitial": true,
65+
"ignorePermissionErrors": true,
66+
"ignored": undefined,
67+
"interval": 200,
68+
"persistent": true,
69+
"usePolling": false,
70+
}
71+
`;
72+
3173
exports[`'watchFiles' option should work with options {"usePolling":false,"poll":true} should pass correct options to chokidar config 1`] = `
3274
Object {
3375
"alwaysStat": true,
@@ -70,6 +112,20 @@ Object {
70112
}
71113
`;
72114

115+
exports[`'watchFiles' option should work with options {"usePolling":true,"poll":200} should pass correct options to chokidar config 1`] = `
116+
Object {
117+
"alwaysStat": true,
118+
"atomic": false,
119+
"followSymlinks": false,
120+
"ignoreInitial": true,
121+
"ignorePermissionErrors": true,
122+
"ignored": undefined,
123+
"interval": 200,
124+
"persistent": true,
125+
"usePolling": true,
126+
}
127+
`;
128+
73129
exports[`'watchFiles' option should work with options {"usePolling":true} should pass correct options to chokidar config 1`] = `
74130
Object {
75131
"alwaysStat": true,

test/server/__snapshots__/watchFiles-option.test.js.snap.webpack5

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3+
exports[`'watchFiles' option should work with options {"interval":400,"poll":200} should pass correct options to chokidar config 1`] = `
4+
Object {
5+
"alwaysStat": true,
6+
"atomic": false,
7+
"followSymlinks": false,
8+
"ignoreInitial": true,
9+
"ignorePermissionErrors": true,
10+
"ignored": undefined,
11+
"interval": 400,
12+
"persistent": true,
13+
"usePolling": true,
14+
}
15+
`;
16+
317
exports[`'watchFiles' option should work with options {"poll":200} should pass correct options to chokidar config 1`] = `
418
Object {
519
"alwaysStat": true,
@@ -28,6 +42,34 @@ Object {
2842
}
2943
`;
3044

45+
exports[`'watchFiles' option should work with options {"usePolling":false,"interval":200,"poll":400} should pass correct options to chokidar config 1`] = `
46+
Object {
47+
"alwaysStat": true,
48+
"atomic": false,
49+
"followSymlinks": false,
50+
"ignoreInitial": true,
51+
"ignorePermissionErrors": true,
52+
"ignored": undefined,
53+
"interval": 200,
54+
"persistent": true,
55+
"usePolling": false,
56+
}
57+
`;
58+
59+
exports[`'watchFiles' option should work with options {"usePolling":false,"poll":200} should pass correct options to chokidar config 1`] = `
60+
Object {
61+
"alwaysStat": true,
62+
"atomic": false,
63+
"followSymlinks": false,
64+
"ignoreInitial": true,
65+
"ignorePermissionErrors": true,
66+
"ignored": undefined,
67+
"interval": 200,
68+
"persistent": true,
69+
"usePolling": false,
70+
}
71+
`;
72+
3173
exports[`'watchFiles' option should work with options {"usePolling":false,"poll":true} should pass correct options to chokidar config 1`] = `
3274
Object {
3375
"alwaysStat": true,
@@ -70,6 +112,20 @@ Object {
70112
}
71113
`;
72114

115+
exports[`'watchFiles' option should work with options {"usePolling":true,"poll":200} should pass correct options to chokidar config 1`] = `
116+
Object {
117+
"alwaysStat": true,
118+
"atomic": false,
119+
"followSymlinks": false,
120+
"ignoreInitial": true,
121+
"ignorePermissionErrors": true,
122+
"ignored": undefined,
123+
"interval": 200,
124+
"persistent": true,
125+
"usePolling": true,
126+
}
127+
`;
128+
73129
exports[`'watchFiles' option should work with options {"usePolling":true} should pass correct options to chokidar config 1`] = `
74130
Object {
75131
"alwaysStat": true,

test/server/watchFiles-option.test.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,18 +327,35 @@ describe("'watchFiles' option", () => {
327327
{
328328
usePolling: true,
329329
},
330+
{
331+
usePolling: true,
332+
poll: 200,
333+
},
330334
{
331335
usePolling: false,
332336
},
337+
{
338+
usePolling: false,
339+
poll: 200,
340+
},
333341
{
334342
usePolling: false,
335343
poll: true,
336344
},
345+
{
346+
interval: 400,
347+
poll: 200,
348+
},
337349
{
338350
usePolling: true,
339351
interval: 200,
340352
poll: 400,
341353
},
354+
{
355+
usePolling: false,
356+
interval: 200,
357+
poll: 400,
358+
},
342359
];
343360

344361
optionCases.forEach((optionCase) => {

0 commit comments

Comments
 (0)