Skip to content

Commit 817c885

Browse files
authored
fix: fix a failing test (#112)
`gts init` must be done before `gts check`. Not sure how this has been passing so far. This started to fail suddenly.
1 parent 925433c commit 817c885

File tree

2 files changed

+29
-25
lines changed

2 files changed

+29
-25
lines changed

package-lock.json

Lines changed: 24 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/test-kitchen.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,11 @@ test.serial('use as a non-locally installed module', async t => {
9595
const GTS = `${stagingPath}/kitchen/node_modules/.bin/gts`;
9696
const tmpDir = tmp.dirSync({keep, unsafeCleanup: true});
9797
await ncpp('test/fixtures', `${tmpDir.name}/`);
98-
await simpleExecp(
99-
`${GTS} check kitchen/src/server.ts`, {cwd: `${tmpDir.name}/kitchen`});
98+
const opts = {cwd: `${tmpDir.name}/kitchen`};
99+
// It's important to use `-n` here because we don't want to overwrite
100+
// the version of gts installed, as it will trigger the npm install.
101+
await simpleExecp(`${GTS} init -n`, opts);
102+
await simpleExecp(`${GTS} check kitchen/src/server.ts`, opts);
100103
if (!keep) {
101104
tmpDir.removeCallback();
102105
}

0 commit comments

Comments
 (0)