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