diff --git a/__tests__/validate.test.ts b/__tests__/validate.test.ts index 042b6bd..a3ec714 100644 --- a/__tests__/validate.test.ts +++ b/__tests__/validate.test.ts @@ -18,10 +18,9 @@ test('validates wrapper jars', async () => { }) test('fails if not enough wrapper jars are found', async () => { - await expect(validate.findInvalidWrapperJars( - path.resolve('.'), - 3, - false, - [] - )).rejects.toThrowError('Expected at least 3 but got only 2') + await expect( + validate.findInvalidWrapperJars(path.resolve('.'), 3, false, []) + ).rejects.toThrowError( + 'Expected to find at least 3 Gradle Wrapper JARs but got only 2' + ) }) diff --git a/dist/index.js b/dist/index.js index 84a43be..fdda1cc 100644 --- a/dist/index.js +++ b/dist/index.js @@ -949,7 +949,7 @@ function findInvalidWrapperJars(gitRepoRoot, minWrapperCount, allowSnapshots, al return __awaiter(this, void 0, void 0, function* () { const wrapperJars = yield find.findWrapperJars(gitRepoRoot); if (wrapperJars.length < minWrapperCount) { - throw new Error(`Expected at least ${minWrapperCount} but got only ${wrapperJars.length}`); + throw new Error(`Expected to find at least ${minWrapperCount} Gradle Wrapper JARs but got only ${wrapperJars.length}`); } if (wrapperJars.length > 0) { const validChecksums = yield checksums.fetchValidChecksums(allowSnapshots); diff --git a/src/validate.ts b/src/validate.ts index 8a0e7f4..0be80e8 100644 --- a/src/validate.ts +++ b/src/validate.ts @@ -9,13 +9,9 @@ export async function findInvalidWrapperJars( allowChecksums: string[] ): Promise { const wrapperJars = await find.findWrapperJars(gitRepoRoot) - // eslint-disable-next-line no-console - console.log( - `Expected at least ${minWrapperCount} but got only ${wrapperJars.length}` - ) if (wrapperJars.length < minWrapperCount) { throw new Error( - `Expected at least ${minWrapperCount} but got only ${wrapperJars.length}` + `Expected to find at least ${minWrapperCount} Gradle Wrapper JARs but got only ${wrapperJars.length}` ) } if (wrapperJars.length > 0) {