mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-05-01 12:38:08 +02:00
Move Jest tests from '__tests__' to 'test/jest'
This commit is contained in:
parent
829c7a236d
commit
c09f41c4bd
2 changed files with 2 additions and 2 deletions
20
test/jest/cache-utils.test.ts
Normal file
20
test/jest/cache-utils.test.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
import * as cacheUtils from '../../src/cache-utils'
|
||||
|
||||
describe('cacheUtils-utils', () => {
|
||||
describe('can hash', () => {
|
||||
it('a string', async () => {
|
||||
const hash = cacheUtils.hashStrings(['foo'])
|
||||
expect(hash).toBe('acbd18db4cc2f85cedef654fccc4a4d8')
|
||||
})
|
||||
it('multiple strings', async () => {
|
||||
const hash = cacheUtils.hashStrings(['foo', 'bar', 'baz'])
|
||||
expect(hash).toBe('6df23dc03f9b54cc38a0fc1483df6e21')
|
||||
})
|
||||
it('normalized filenames', async () => {
|
||||
const fileNames = ['/foo/bar/baz.zip', '../boo.html']
|
||||
const posixHash = cacheUtils.hashFileNames(fileNames)
|
||||
const windowsHash = cacheUtils.hashFileNames(fileNames)
|
||||
expect(posixHash).toBe(windowsHash)
|
||||
})
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue