Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuibu committed Nov 7, 2022
1 parent ba89b62 commit 0c64b03
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions packages/jest-config/src/__tests__/normalize.test.ts
Expand Up @@ -101,6 +101,23 @@ it('keeps custom project id based on the projects rootDir', async () => {
);
});

it('validation warning occurs when options not for projects is set', async () => {
const mockWarn = jest.mocked(console.warn).mockImplementation(() => {});
const rootDir = '/root/path/foo';
const {options} = await normalize(
{
bail: true, // an option not for projects
rootDir,
},
{} as Config.Argv,
rootDir,
1,
true, // isProjectOptions
);

expect(mockWarn).toHaveBeenCalledTimes(1);
});

it('keeps custom ids based on the rootDir', async () => {
const {options} = await normalize(
{
Expand Down

0 comments on commit 0c64b03

Please sign in to comment.