Prevent spec file updates from restarting dev server (#113336)

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
This commit is contained in:
Tyler Smalley 2021-09-30 15:45:25 -07:00 committed by GitHub
parent 8b32407368
commit 01e6ff3b53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -38,7 +38,7 @@ it('produces the right watch and ignore list', () => {
expect(ignorePaths).toMatchInlineSnapshot(`
Array [
/\\[\\\\\\\\\\\\/\\]\\(\\\\\\.\\.\\*\\|node_modules\\|bower_components\\|target\\|public\\|__\\[a-z0-9_\\]\\+__\\|coverage\\)\\(\\[\\\\\\\\\\\\/\\]\\|\\$\\)/,
/\\\\\\.test\\\\\\.\\(js\\|tsx\\?\\)\\$/,
/\\\\\\.\\(test\\|spec\\)\\\\\\.\\(js\\|ts\\|tsx\\)\\$/,
/\\\\\\.\\(md\\|sh\\|txt\\)\\$/,
/debug\\\\\\.log\\$/,
<absolute path>/src/plugins/*/test/**,

View file

@ -52,7 +52,7 @@ export function getServerWatchPaths({ pluginPaths, pluginScanDirs }: Options) {
const ignorePaths = [
/[\\\/](\..*|node_modules|bower_components|target|public|__[a-z0-9_]+__|coverage)([\\\/]|$)/,
/\.test\.(js|tsx?)$/,
/\.(test|spec)\.(js|ts|tsx)$/,
/\.(md|sh|txt)$/,
/debug\.log$/,
...pluginInternalDirsIgnore,