Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: throw error in case of no package manager file found #4

Closed
wants to merge 8 commits into from
10 changes: 4 additions & 6 deletions __tests__/cache.test.ts
Expand Up @@ -65,9 +65,8 @@ describe('dependency cache', () => {
});

describe('for maven', () => {
it('warns if no pom.xml found', async () => {
await restore('maven');
expect(spyWarning).toBeCalledWith(
it('throws error if no pom.xml found', async () => {
await expect(restore('maven')).rejects.toThrowError(
`No file in ${projectRoot(
workspace
)} matched to [**/pom.xml], make sure you have checked out the target repository`
Expand All @@ -83,9 +82,8 @@ describe('dependency cache', () => {
});
});
describe('for gradle', () => {
it('warns if no build.gradle found', async () => {
await restore('gradle');
expect(spyWarning).toBeCalledWith(
it('throws error if no build.gradle found', async () => {
await expect(restore('gradle')).rejects.toThrowError(
`No file in ${projectRoot(
workspace
)} matched to [**/*.gradle*,**/gradle-wrapper.properties], make sure you have checked out the target repository`
Expand Down