Skip to content

Commit 92243ee

Browse files
committed
move test to better place
1 parent 8f54dae commit 92243ee

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

test/test-kitchen.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,7 @@ test.serial('init', async t => {
8787
}
8888
const tsconfigPath = `${stagingPath}/kitchen/tsconfig.json`;
8989
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();
9591
});
9692

9793
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 => {
10096
const GTS = `${stagingPath}/kitchen/node_modules/.bin/gts`;
10197
const tmpDir = tmp.dirSync({keep, unsafeCleanup: true});
10298
await ncpp('test/fixtures', `${tmpDir.name}/`);
99+
103100
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+
107108
await simpleExecp(`${GTS} check kitchen/src/server.ts`, opts);
108109
if (!keep) {
109110
tmpDir.removeCallback();

0 commit comments

Comments
 (0)