From 648c5edd0482de1c9ed2e8933f68e87be52717bf Mon Sep 17 00:00:00 2001 From: Salman Muin Kayser Chishti Date: Tue, 18 Nov 2025 14:21:47 +0000 Subject: [PATCH] update hash files test --- __tests__/hash-files.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/__tests__/hash-files.test.ts b/__tests__/hash-files.test.ts index 51ed3ee..7f87807 100644 --- a/__tests__/hash-files.test.ts +++ b/__tests__/hash-files.test.ts @@ -4,6 +4,7 @@ import {hashFiles} from '../src/glob' import {promises as fs} from 'fs' const IS_WINDOWS = process.platform === 'win32' +const ORIGINAL_GITHUB_WORKSPACE = process.env['GITHUB_WORKSPACE'] /** * These test focus on the ability of globber to find files @@ -12,6 +13,16 @@ const IS_WINDOWS = process.platform === 'win32' describe('globber', () => { beforeAll(async () => { await io.rmRF(getTestTemp()) + process.env['GITHUB_WORKSPACE'] = process.cwd() + }) + + afterAll(async () => { + if (ORIGINAL_GITHUB_WORKSPACE) { + process.env['GITHUB_WORKSPACE'] = ORIGINAL_GITHUB_WORKSPACE + } else { + delete process.env['GITHUB_WORKSPACE'] + } + await io.rmRF(getTestTemp()) }) it('basic hashfiles test', async () => {