mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-18 02:25:56 +08:00
Change testcase to test against github workspace directory instead of current directory
This commit is contained in:
parent
83bca5cb13
commit
e98bae803b
7
packages/cache/__tests__/cacheUtils.test.ts
vendored
7
packages/cache/__tests__/cacheUtils.test.ts
vendored
@ -33,7 +33,8 @@ test('assertDefined returns value', () => {
|
|||||||
expect(cacheUtils.assertDefined('test', 5)).toBe(5)
|
expect(cacheUtils.assertDefined('test', 5)).toBe(5)
|
||||||
})
|
})
|
||||||
|
|
||||||
test('resolvePaths works on current directory', async () => {
|
test('resolvePaths works on github workspace directory', async () => {
|
||||||
const paths = await cacheUtils.resolvePaths(['.'])
|
const workspace = process.env['GITHUB_WORKSPACE'] ?? '.'
|
||||||
expect(paths.length).toBe(1)
|
const paths = await cacheUtils.resolvePaths([workspace])
|
||||||
|
expect(paths.length).toBeGreaterThan(0)
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user