mirror of https://github.com/actions/toolkit
fix #1579: add test to check getCacheVersion does not mutate arguments
parent
b807fc9c54
commit
8fee77b04b
|
@ -5,6 +5,12 @@ import {DownloadOptions, getDownloadOptions} from '../src/options'
|
||||||
|
|
||||||
jest.mock('../src/internal/downloadUtils')
|
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 () => {
|
test('getCacheVersion with one path returns version', async () => {
|
||||||
const paths = ['node_modules']
|
const paths = ['node_modules']
|
||||||
const result = getCacheVersion(paths, undefined, true)
|
const result = getCacheVersion(paths, undefined, true)
|
||||||
|
|
Loading…
Reference in New Issue