mirror of https://github.com/actions/toolkit
Merge pull request #1683 from Smeb/fix-1579
fix #1579: add test to check getCacheVersion does not mutate argumentspull/1685/head
commit
ef77c9d60b
|
@ -5,6 +5,12 @@ import {DownloadOptions, getDownloadOptions} from '../src/options'
|
|||
|
||||
jest.mock('../src/internal/downloadUtils')
|
||||
|
||||
test('getCacheVersion does not mutate arguments', async () => {
|
||||
const paths = ['node_modules']
|
||||
getCacheVersion(paths, undefined, true)
|
||||
expect(paths).toEqual(['node_modules'])
|
||||
})
|
||||
|
||||
test('getCacheVersion with one path returns version', async () => {
|
||||
const paths = ['node_modules']
|
||||
const result = getCacheVersion(paths, undefined, true)
|
||||
|
|
Loading…
Reference in New Issue