Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add e2e tests for
watchFiles
option (#4081)
- Loading branch information
Showing
6 changed files
with
1,301 additions
and
689 deletions.
There are no files selected for viewing
311 changes: 311 additions & 0 deletions
311
test/e2e/__snapshots__/watch-files.test.js.snap.webpack4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,311 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`watchFiles option should not crash if file doesn't exist should reload when file content is changed: console messages 1`] = ` | ||
Array [ | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`watchFiles option should not crash if file doesn't exist should reload when file content is changed: page errors 1`] = `Array []`; | ||
|
||
exports[`watchFiles option should not crash if file doesn't exist should reload when file content is changed: response status 1`] = `200`; | ||
|
||
exports[`watchFiles option should work with array config should reload when file content is changed: console messages 1`] = ` | ||
Array [ | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`watchFiles option should work with array config should reload when file content is changed: page errors 1`] = `Array []`; | ||
|
||
exports[`watchFiles option should work with array config should reload when file content is changed: response status 1`] = `200`; | ||
|
||
exports[`watchFiles option should work with object with multiple paths should reload when file content is changed: console messages 1`] = ` | ||
Array [ | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`watchFiles option should work with object with multiple paths should reload when file content is changed: page errors 1`] = `Array []`; | ||
|
||
exports[`watchFiles option should work with object with multiple paths should reload when file content is changed: response status 1`] = `200`; | ||
|
||
exports[`watchFiles option should work with object with single path should reload when file content is changed: console messages 1`] = ` | ||
Array [ | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`watchFiles option should work with object with single path should reload when file content is changed: page errors 1`] = `Array []`; | ||
|
||
exports[`watchFiles option should work with object with single path should reload when file content is changed: response status 1`] = `200`; | ||
|
||
exports[`watchFiles option should work with options {"interval":400,"poll":200} should reload when file content is changed 1`] = ` | ||
Object { | ||
"alwaysStat": true, | ||
"atomic": false, | ||
"followSymlinks": false, | ||
"ignoreInitial": true, | ||
"ignorePermissionErrors": true, | ||
"ignored": undefined, | ||
"interval": 400, | ||
"persistent": true, | ||
"usePolling": true, | ||
} | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"interval":400,"poll":200} should reload when file content is changed: console messages 1`] = ` | ||
Array [ | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"interval":400,"poll":200} should reload when file content is changed: page errors 1`] = `Array []`; | ||
|
||
exports[`watchFiles option should work with options {"interval":400,"poll":200} should reload when file content is changed: response status 1`] = `200`; | ||
|
||
exports[`watchFiles option should work with options {"poll":200} should reload when file content is changed 1`] = ` | ||
Object { | ||
"alwaysStat": true, | ||
"atomic": false, | ||
"followSymlinks": false, | ||
"ignoreInitial": true, | ||
"ignorePermissionErrors": true, | ||
"ignored": undefined, | ||
"interval": 200, | ||
"persistent": true, | ||
"usePolling": true, | ||
} | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"poll":200} should reload when file content is changed: console messages 1`] = ` | ||
Array [ | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"poll":200} should reload when file content is changed: page errors 1`] = `Array []`; | ||
|
||
exports[`watchFiles option should work with options {"poll":200} should reload when file content is changed: response status 1`] = `200`; | ||
|
||
exports[`watchFiles option should work with options {"poll":true} should reload when file content is changed 1`] = ` | ||
Object { | ||
"alwaysStat": true, | ||
"atomic": false, | ||
"followSymlinks": false, | ||
"ignoreInitial": true, | ||
"ignorePermissionErrors": true, | ||
"ignored": undefined, | ||
"interval": undefined, | ||
"persistent": true, | ||
"usePolling": true, | ||
} | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"poll":true} should reload when file content is changed: console messages 1`] = ` | ||
Array [ | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"poll":true} should reload when file content is changed: page errors 1`] = `Array []`; | ||
|
||
exports[`watchFiles option should work with options {"poll":true} should reload when file content is changed: response status 1`] = `200`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":false,"interval":200,"poll":400} should reload when file content is changed 1`] = ` | ||
Object { | ||
"alwaysStat": true, | ||
"atomic": false, | ||
"followSymlinks": false, | ||
"ignoreInitial": true, | ||
"ignorePermissionErrors": true, | ||
"ignored": undefined, | ||
"interval": 200, | ||
"persistent": true, | ||
"usePolling": false, | ||
} | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":false,"interval":200,"poll":400} should reload when file content is changed: console messages 1`] = ` | ||
Array [ | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":false,"interval":200,"poll":400} should reload when file content is changed: page errors 1`] = `Array []`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":false,"interval":200,"poll":400} should reload when file content is changed: response status 1`] = `200`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":false,"poll":200} should reload when file content is changed 1`] = ` | ||
Object { | ||
"alwaysStat": true, | ||
"atomic": false, | ||
"followSymlinks": false, | ||
"ignoreInitial": true, | ||
"ignorePermissionErrors": true, | ||
"ignored": undefined, | ||
"interval": 200, | ||
"persistent": true, | ||
"usePolling": false, | ||
} | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":false,"poll":200} should reload when file content is changed: console messages 1`] = ` | ||
Array [ | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":false,"poll":200} should reload when file content is changed: page errors 1`] = `Array []`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":false,"poll":200} should reload when file content is changed: response status 1`] = `200`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":false,"poll":true} should reload when file content is changed 1`] = ` | ||
Object { | ||
"alwaysStat": true, | ||
"atomic": false, | ||
"followSymlinks": false, | ||
"ignoreInitial": true, | ||
"ignorePermissionErrors": true, | ||
"ignored": undefined, | ||
"interval": undefined, | ||
"persistent": true, | ||
"usePolling": false, | ||
} | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":false,"poll":true} should reload when file content is changed: console messages 1`] = ` | ||
Array [ | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":false,"poll":true} should reload when file content is changed: page errors 1`] = `Array []`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":false,"poll":true} should reload when file content is changed: response status 1`] = `200`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":false} should reload when file content is changed 1`] = ` | ||
Object { | ||
"alwaysStat": true, | ||
"atomic": false, | ||
"followSymlinks": false, | ||
"ignoreInitial": true, | ||
"ignorePermissionErrors": true, | ||
"ignored": undefined, | ||
"interval": undefined, | ||
"persistent": true, | ||
"usePolling": false, | ||
} | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":false} should reload when file content is changed: console messages 1`] = ` | ||
Array [ | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":false} should reload when file content is changed: page errors 1`] = `Array []`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":false} should reload when file content is changed: response status 1`] = `200`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":true,"interval":200,"poll":400} should reload when file content is changed 1`] = ` | ||
Object { | ||
"alwaysStat": true, | ||
"atomic": false, | ||
"followSymlinks": false, | ||
"ignoreInitial": true, | ||
"ignorePermissionErrors": true, | ||
"ignored": undefined, | ||
"interval": 200, | ||
"persistent": true, | ||
"usePolling": true, | ||
} | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":true,"interval":200,"poll":400} should reload when file content is changed: console messages 1`] = ` | ||
Array [ | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":true,"interval":200,"poll":400} should reload when file content is changed: page errors 1`] = `Array []`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":true,"interval":200,"poll":400} should reload when file content is changed: response status 1`] = `200`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":true,"poll":200} should reload when file content is changed 1`] = ` | ||
Object { | ||
"alwaysStat": true, | ||
"atomic": false, | ||
"followSymlinks": false, | ||
"ignoreInitial": true, | ||
"ignorePermissionErrors": true, | ||
"ignored": undefined, | ||
"interval": 200, | ||
"persistent": true, | ||
"usePolling": true, | ||
} | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":true,"poll":200} should reload when file content is changed: console messages 1`] = ` | ||
Array [ | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":true,"poll":200} should reload when file content is changed: page errors 1`] = `Array []`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":true,"poll":200} should reload when file content is changed: response status 1`] = `200`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":true} should reload when file content is changed 1`] = ` | ||
Object { | ||
"alwaysStat": true, | ||
"atomic": false, | ||
"followSymlinks": false, | ||
"ignoreInitial": true, | ||
"ignorePermissionErrors": true, | ||
"ignored": undefined, | ||
"interval": undefined, | ||
"persistent": true, | ||
"usePolling": true, | ||
} | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":true} should reload when file content is changed: console messages 1`] = ` | ||
Array [ | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":true} should reload when file content is changed: page errors 1`] = `Array []`; | ||
|
||
exports[`watchFiles option should work with options {"usePolling":true} should reload when file content is changed: response status 1`] = `200`; | ||
|
||
exports[`watchFiles option should work with string and glob should reload when file content is changed: console messages 1`] = ` | ||
Array [ | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`watchFiles option should work with string and glob should reload when file content is changed: page errors 1`] = `Array []`; | ||
|
||
exports[`watchFiles option should work with string and glob should reload when file content is changed: response status 1`] = `200`; | ||
|
||
exports[`watchFiles option should work with string and path to directory should reload when file content is changed: console messages 1`] = ` | ||
Array [ | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`watchFiles option should work with string and path to directory should reload when file content is changed: page errors 1`] = `Array []`; | ||
|
||
exports[`watchFiles option should work with string and path to directory should reload when file content is changed: response status 1`] = `200`; | ||
|
||
exports[`watchFiles option should work with string and path to file should reload when file content is changed: console messages 1`] = ` | ||
Array [ | ||
"Hey.", | ||
] | ||
`; | ||
|
||
exports[`watchFiles option should work with string and path to file should reload when file content is changed: page errors 1`] = `Array []`; | ||
|
||
exports[`watchFiles option should work with string and path to file should reload when file content is changed: response status 1`] = `200`; |
Oops, something went wrong.