@@ -87,11 +87,7 @@ test.serial('init', async t => {
87
87
}
88
88
const tsconfigPath = `${ stagingPath } /kitchen/tsconfig.json` ;
89
89
fs . accessSync ( tsconfigPath ) ;
90
-
91
- // The `extends` field must use the local gts path.
92
- const tsconfigJson = fs . readFileSync ( tsconfigPath , 'utf8' ) ;
93
- const tsconfig = JSON . parse ( tsconfigJson ) ;
94
- t . deepEqual ( tsconfig . extends , './node_modules/gts/tsconfig-google.json' ) ;
90
+ t . pass ( ) ;
95
91
} ) ;
96
92
97
93
test . serial ( 'use as a non-locally installed module' , async t => {
@@ -100,10 +96,15 @@ test.serial('use as a non-locally installed module', async t => {
100
96
const GTS = `${ stagingPath } /kitchen/node_modules/.bin/gts` ;
101
97
const tmpDir = tmp . dirSync ( { keep, unsafeCleanup : true } ) ;
102
98
await ncpp ( 'test/fixtures' , `${ tmpDir . name } /` ) ;
99
+
103
100
const opts = { cwd : `${ tmpDir . name } /kitchen` } ;
104
- // It's important to use `-n` here because we don't want to overwrite
105
- // the version of gts installed, as it will trigger the npm install.
106
- await simpleExecp ( `${ GTS } init -n` , opts ) ;
101
+ await simpleExecp ( `${ GTS } init -y` , opts ) ;
102
+ // The `extends` field must use the local gts path.
103
+ const tsconfigJson =
104
+ fs . readFileSync ( `${ tmpDir . name } /kitchen/tsconfig.json` , 'utf8' ) ;
105
+ const tsconfig = JSON . parse ( tsconfigJson ) ;
106
+ t . deepEqual ( tsconfig . extends , './node_modules/gts/tsconfig-google.json' ) ;
107
+
107
108
await simpleExecp ( `${ GTS } check kitchen/src/server.ts` , opts ) ;
108
109
if ( ! keep ) {
109
110
tmpDir . removeCallback ( ) ;
0 commit comments