From 6e029425c431d797aa38acc4943036320fe4788e Mon Sep 17 00:00:00 2001 From: GP Date: Sun, 7 May 2023 10:42:59 +0530 Subject: [PATCH] fix(tests): fix the Windows path See https://github.com/ljharb/tape/issues/593#issuecomment-1537292595 Looks like inside Windows (NTFS), all paths are case insensitive. The Windows laptop I used reported the default path as 'C:\WINDOWS', while the CI machine reports it as 'C:\Windows' --- test/main.test.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/main.test.ts b/test/main.test.ts index 1bdc8699..cea24e05 100644 --- a/test/main.test.ts +++ b/test/main.test.ts @@ -36,7 +36,7 @@ const EXE_EXT = PLATFORM === 'win32' ? 'bat' : ('sh' as const); const DEFAULT_WORKDIR = process.cwd(); const EXE_PATH_PREFIX = PLATFORM === 'win32' - ? 'C:\\WINDOWS\\system32\\cmd.exe /D /S /C' + ? 'C:\\Windows\\system32\\cmd.exe /D /S /C' : ('' as const); let ECHO_CMD = PLATFORM === 'win32' ? `${EXE_PATH_PREFIX} echo` : '/bin/echo'; @@ -145,10 +145,6 @@ test('🧪 run() should run the CC reporter (happy path).', async (t) => { `::debug::✅ CC Reporter after-build checkin completed!`, ``, ].join(EOL); - console.debug('->> capturedOutput length = ', capturedOutput.length); - console.debug('->> expected length = ', expected.length); - console.debug('->>>> capturedOutput = ', JSON.stringify(capturedOutput)); - console.debug('->>>> expected = ', JSON.stringify(expected)); t.equal( JSON.stringify(capturedOutput), JSON.stringify(expected),