2020-01-06 10:37:12 +00:00
|
|
|
import * as path from 'path'
|
2020-01-05 11:55:59 +00:00
|
|
|
import * as validate from '../src/validate'
|
|
|
|
|
|
|
|
test('validates wrapper jars', async () => {
|
2020-01-06 10:56:42 +00:00
|
|
|
const invalidWrapperJars = await validate.findInvalidWrapperJars(
|
2020-01-06 10:37:12 +00:00
|
|
|
path.resolve('.'),
|
2020-01-06 12:36:28 +00:00
|
|
|
false,
|
|
|
|
[]
|
2020-01-06 10:37:12 +00:00
|
|
|
)
|
|
|
|
expect(invalidWrapperJars.length).toBe(1)
|
|
|
|
expect(invalidWrapperJars[0]).toEqual(
|
2020-01-06 12:50:19 +00:00
|
|
|
new validate.InvalidWrapperJar(
|
|
|
|
'__tests__/data/invalid/gradle-wrapper.jar',
|
|
|
|
'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
|
|
|
|
)
|
2020-01-06 10:37:12 +00:00
|
|
|
)
|
2020-01-05 11:55:59 +00:00
|
|
|
})
|