Skip to content

Commit

Permalink
Fix validateProjectConfig tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mendel-at-hubspot committed Nov 6, 2023
1 parent 7dc3b30 commit 2f9ba49
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions packages/cli/lib/__tests__/projects.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ describe('@hubspot/cli/lib/projects', () => {

expect(exitMock).toHaveBeenCalledWith(EXIT_CODES.ERROR);
expect(errorSpy).toHaveBeenCalledWith(
expect.stringMatching(
new RegExp(`.*'..'.*contained within.*'${projectDir}'.*`)
)
expect.stringContaining('srcDir: ".."')
);
expect(errorSpy).toHaveBeenCalledWith(
expect.stringContaining(`within ${projectDir}`)
);
});

Expand All @@ -83,9 +84,10 @@ describe('@hubspot/cli/lib/projects', () => {

expect(exitMock).toHaveBeenCalledWith(EXIT_CODES.ERROR);
expect(errorSpy).toHaveBeenCalledWith(
expect.stringMatching(
new RegExp(`.*'/'.*contained within.*'${projectDir}'.*`)
)
expect.stringContaining('srcDir: "/"')
);
expect(errorSpy).toHaveBeenCalledWith(
expect.stringContaining(`within ${projectDir}`)
);
});

Expand All @@ -96,9 +98,10 @@ describe('@hubspot/cli/lib/projects', () => {

expect(exitMock).toHaveBeenCalledWith(EXIT_CODES.ERROR);
expect(errorSpy).toHaveBeenCalledWith(
expect.stringMatching(
new RegExp(`.*'${srcDir}'.*contained within.*'${projectDir}'.*`)
)
expect.stringContaining(`srcDir: "${srcDir}"`)
);
expect(errorSpy).toHaveBeenCalledWith(
expect.stringContaining(`within ${projectDir}`)
);
});
});
Expand Down

0 comments on commit 2f9ba49

Please sign in to comment.