File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
e2e/__tests__/__snapshots__
packages/jest-cli/src/init/__tests__ Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ exports[`--showConfig outputs config info and exits 1`] = `
7474 " /node_modules/"
7575 ],
7676 " testRegex" : [],
77- " testRunner" : " <<REPLACED_JEST_PACKAGES_DIR>>/jest-circus/runner.js" ,
77+ " testRunner" : " <<REPLACED_JEST_PACKAGES_DIR>>/jest-circus/build/ runner.js" ,
7878 " transform" : [
7979 [
8080 " \\\\ .[jt]sx?$" ,
Original file line number Diff line number Diff line change @@ -15,10 +15,6 @@ import init from '../';
1515const { JEST_CONFIG_EXT_ORDER } = constants ;
1616
1717jest . mock ( 'prompts' ) ;
18- jest . mock (
19- '../../../../jest-config/build/getCacheDirectory' ,
20- ( ) => ( ) => '/tmp/jest' ,
21- ) ;
2218jest . mock ( 'path' , ( ) => ( {
2319 ...jest . requireActual < typeof import ( 'path' ) > ( 'path' ) ,
2420 sep : '/' ,
@@ -52,7 +48,12 @@ describe('init', () => {
5248
5349 const writtenJestConfig = jest . mocked ( writeFileSync ) . mock . calls [ 0 ] [ 1 ] ;
5450
55- expect ( writtenJestConfig ) . toMatchSnapshot ( ) ;
51+ expect (
52+ writtenJestConfig . replace (
53+ / \/ \/ c a c h e D i r e c t o r y : .* , / ,
54+ '// cacheDirectory: "/tmp/jest",' ,
55+ ) ,
56+ ) . toMatchSnapshot ( ) ;
5657
5758 const evaluatedConfig = eval ( writtenJestConfig as string ) as Record <
5859 string ,
You can’t perform that action at this time.
0 commit comments