2020-01-06 11:37:12 +01:00
|
|
|
|
import * as path from 'path'
|
2020-01-05 12:55:59 +01:00
|
|
|
|
import * as find from '../src/find'
|
2021-07-20 20:48:16 +08:00
|
|
|
|
import {expect, test} from '@jest/globals'
|
2020-01-05 12:55:59 +01:00
|
|
|
|
|
|
|
|
|
test('finds test data wrapper jars', async () => {
|
2020-01-06 11:37:12 +01:00
|
|
|
|
const repoRoot = path.resolve('.')
|
|
|
|
|
const wrapperJars = await find.findWrapperJars(repoRoot)
|
2020-01-13 12:39:40 -05:00
|
|
|
|
expect(wrapperJars.length).toBe(3)
|
2020-01-06 11:37:12 +01:00
|
|
|
|
expect(wrapperJars).toContain('__tests__/data/valid/gradle-wrapper.jar')
|
|
|
|
|
expect(wrapperJars).toContain('__tests__/data/invalid/gradle-wrapper.jar')
|
2020-01-13 12:39:40 -05:00
|
|
|
|
expect(wrapperJars).toContain('__tests__/data/invalid/gradlе-wrapper.jar') // homoglyph
|
2020-01-05 12:55:59 +01:00
|
|
|
|
})
|