test: fix failing test & update snapshots

This commit is contained in:
Igor Randjelovic
2021-03-01 21:49:33 +01:00
parent b5049add21
commit 6963e81d9f
6 changed files with 159 additions and 61 deletions

View File

@ -216,7 +216,10 @@ exports[`angular configuration for android 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -224,7 +227,10 @@ exports[`angular configuration for android 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -232,7 +238,10 @@ exports[`angular configuration for android 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
} }
] ]
@ -270,7 +279,7 @@ exports[`angular configuration for ios 1`] = `
devtool: 'inline-source-map', devtool: 'inline-source-map',
target: 'node', target: 'node',
output: { output: {
path: '__jest__/platforms/ios/__jest__/app', path: '__jest__/platforms/ios/jest/app',
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
@ -443,7 +452,7 @@ exports[`angular configuration for ios 1`] = `
new CleanWebpackPlugin( new CleanWebpackPlugin(
{ {
cleanOnceBeforeBuildPatterns: [ cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/ios/__jest__/app/**/*' '__jest__/platforms/ios/jest/app/**/*'
], ],
verbose: false verbose: false
} }
@ -476,7 +485,10 @@ exports[`angular configuration for ios 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -484,7 +496,10 @@ exports[`angular configuration for ios 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -492,7 +507,10 @@ exports[`angular configuration for ios 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
} }
] ]

View File

@ -221,7 +221,10 @@ exports[`javascript configuration for android 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -229,7 +232,10 @@ exports[`javascript configuration for android 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -237,7 +243,10 @@ exports[`javascript configuration for android 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
} }
] ]
@ -276,7 +285,7 @@ exports[`javascript configuration for ios 1`] = `
devtool: 'inline-source-map', devtool: 'inline-source-map',
target: 'node', target: 'node',
output: { output: {
path: '__jest__/platforms/ios/__jest__/app', path: '__jest__/platforms/ios/jest/app',
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
@ -454,7 +463,7 @@ exports[`javascript configuration for ios 1`] = `
new CleanWebpackPlugin( new CleanWebpackPlugin(
{ {
cleanOnceBeforeBuildPatterns: [ cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/ios/__jest__/app/**/*' '__jest__/platforms/ios/jest/app/**/*'
], ],
verbose: false verbose: false
} }
@ -487,7 +496,10 @@ exports[`javascript configuration for ios 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -495,7 +507,10 @@ exports[`javascript configuration for ios 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -503,7 +518,10 @@ exports[`javascript configuration for ios 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
} }
] ]

View File

@ -227,7 +227,10 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -235,7 +238,10 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -243,7 +249,10 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
} }
] ]
@ -488,7 +497,10 @@ exports[`react configuration > android > base config 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -496,7 +508,10 @@ exports[`react configuration > android > base config 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -504,7 +519,10 @@ exports[`react configuration > android > base config 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
} }
] ]
@ -532,7 +550,7 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena
devtool: 'inline-source-map', devtool: 'inline-source-map',
target: 'node', target: 'node',
output: { output: {
path: '__jest__/platforms/ios/__jest__/app', path: '__jest__/platforms/ios/jest/app',
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
@ -714,7 +732,7 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena
new CleanWebpackPlugin( new CleanWebpackPlugin(
{ {
cleanOnceBeforeBuildPatterns: [ cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/ios/__jest__/app/**/*' '__jest__/platforms/ios/jest/app/**/*'
], ],
verbose: false verbose: false
} }
@ -749,7 +767,10 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -757,7 +778,10 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -765,7 +789,10 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
} }
] ]
@ -807,7 +834,7 @@ exports[`react configuration > ios > base config 1`] = `
devtool: 'inline-source-map', devtool: 'inline-source-map',
target: 'node', target: 'node',
output: { output: {
path: '__jest__/platforms/ios/__jest__/app', path: '__jest__/platforms/ios/jest/app',
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
@ -978,7 +1005,7 @@ exports[`react configuration > ios > base config 1`] = `
new CleanWebpackPlugin( new CleanWebpackPlugin(
{ {
cleanOnceBeforeBuildPatterns: [ cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/ios/__jest__/app/**/*' '__jest__/platforms/ios/jest/app/**/*'
], ],
verbose: false verbose: false
} }
@ -1013,7 +1040,10 @@ exports[`react configuration > ios > base config 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -1021,7 +1051,10 @@ exports[`react configuration > ios > base config 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -1029,7 +1062,10 @@ exports[`react configuration > ios > base config 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
} }
] ]

View File

@ -150,12 +150,7 @@ exports[`svelte configuration for android 1`] = `
loader: 'svelte-loader-hot', loader: 'svelte-loader-hot',
options: { options: {
dev: true, dev: true,
preprocess: [ preprocess: undefined,
undefined,
{
markup: function () { /* omitted long function */ }
}
],
hotReload: true, hotReload: true,
hotOptions: { hotOptions: {
injectCss: false, injectCss: false,
@ -240,7 +235,10 @@ exports[`svelte configuration for android 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -248,7 +246,10 @@ exports[`svelte configuration for android 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -256,7 +257,10 @@ exports[`svelte configuration for android 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
} }
] ]
@ -284,7 +288,7 @@ exports[`svelte configuration for ios 1`] = `
devtool: 'inline-source-map', devtool: 'inline-source-map',
target: 'node', target: 'node',
output: { output: {
path: '__jest__/platforms/ios/__jest__/app', path: '__jest__/platforms/ios/jest/app',
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
@ -424,12 +428,7 @@ exports[`svelte configuration for ios 1`] = `
loader: 'svelte-loader-hot', loader: 'svelte-loader-hot',
options: { options: {
dev: true, dev: true,
preprocess: [ preprocess: undefined,
undefined,
{
markup: function () { /* omitted long function */ }
}
],
hotReload: true, hotReload: true,
hotOptions: { hotOptions: {
injectCss: false, injectCss: false,
@ -481,7 +480,7 @@ exports[`svelte configuration for ios 1`] = `
new CleanWebpackPlugin( new CleanWebpackPlugin(
{ {
cleanOnceBeforeBuildPatterns: [ cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/ios/__jest__/app/**/*' '__jest__/platforms/ios/jest/app/**/*'
], ],
verbose: false verbose: false
} }
@ -514,7 +513,10 @@ exports[`svelte configuration for ios 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -522,7 +524,10 @@ exports[`svelte configuration for ios 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -530,7 +535,10 @@ exports[`svelte configuration for ios 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
} }
] ]

View File

@ -242,7 +242,10 @@ exports[`vue configuration for android 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -250,7 +253,10 @@ exports[`vue configuration for android 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -258,7 +264,10 @@ exports[`vue configuration for android 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
} }
] ]
@ -286,7 +295,7 @@ exports[`vue configuration for ios 1`] = `
devtool: 'inline-source-map', devtool: 'inline-source-map',
target: 'node', target: 'node',
output: { output: {
path: '__jest__/platforms/ios/__jest__/app', path: '__jest__/platforms/ios/jest/app',
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
@ -485,7 +494,7 @@ exports[`vue configuration for ios 1`] = `
new CleanWebpackPlugin( new CleanWebpackPlugin(
{ {
cleanOnceBeforeBuildPatterns: [ cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/ios/__jest__/app/**/*' '__jest__/platforms/ios/jest/app/**/*'
], ],
verbose: false verbose: false
} }
@ -518,7 +527,10 @@ exports[`vue configuration for ios 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -526,7 +538,10 @@ exports[`vue configuration for ios 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
}, },
{ {
@ -534,7 +549,10 @@ exports[`vue configuration for ios 1`] = `
context: '__jest__/src', context: '__jest__/src',
noErrorOnMissing: true, noErrorOnMissing: true,
globOptions: { globOptions: {
dot: false dot: false,
ignore: [
'../**'
]
} }
} }
] ]

View File

@ -20,7 +20,7 @@ jest.mock('path', () => {
...path, ...path,
resolve(...args) { resolve(...args) {
if (args[0] === '__jest__') { if (args[0] === '__jest__') {
return path.join(...args); return path.join(...args.filter(Boolean));
} }
const resolved = path.resolve(...args); const resolved = path.resolve(...args);