From ad9dd6b6e4bb2c757fbb1c210fc10d2c729cda16 Mon Sep 17 00:00:00 2001 From: Daniel Bankhead Date: Tue, 1 Oct 2024 16:30:16 -0700 Subject: [PATCH] chore: Fix paths --- test/kitchen.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/kitchen.ts b/test/kitchen.ts index df1888e2..2d8c695c 100644 --- a/test/kitchen.ts +++ b/test/kitchen.ts @@ -14,7 +14,7 @@ const keep = !!process.env.GTS_KEEP_TEMPDIRS; const stagingDir = tmp.dirSync({keep, unsafeCleanup: true}); const stagingPath = stagingDir.name; const execOpts = { - cwd: `${stagingPath}${path.sep}kitchen`, + cwd: path.join(stagingPath, 'kitchen'), encoding: 'utf8' as BufferEncoding, }; @@ -73,7 +73,13 @@ describe('🚰 kitchen sink', () => { it('should use as a non-locally installed module', () => { // Use from a directory different from where we have locally installed. This // simulates use as a globally installed module. - const GTS = path.resolve(stagingPath, 'kitchen/node_modules/.bin/gts'); + const GTS = path.resolve( + stagingPath, + 'kitchen', + 'node_modules', + '.bin', + 'gts' + ); const tmpDir = tmp.dirSync({keep, unsafeCleanup: true}); const opts = {cwd: path.join(tmpDir.name, 'kitchen')};