update hash files test
This commit is contained in:
1 parent
ead5df80da
commit
648c5edd04
1 file changed
+11
@@ -4,6 +4,7 @@ import {hashFiles} from '../src/glob'
|
|||||||
import {promises as fs} from 'fs'
|
import {promises as fs} from 'fs'
|
||||||
|
|
||||||
const IS_WINDOWS = process.platform === 'win32'
|
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
|
* These test focus on the ability of globber to find files
|
||||||
@@ -12,6 +13,16 @@ const IS_WINDOWS = process.platform === 'win32'
|
|||||||
describe('globber', () => {
|
describe('globber', () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
await io.rmRF(getTestTemp())
|
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 () => {
|
it('basic hashfiles test', async () => {
|
||||||
|
|||||||
Reference in new issue
Block a user