Skip to content

Commit 0c64b03

Browse files
committed
Add a test
1 parent ba89b62 commit 0c64b03

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

packages/jest-config/src/__tests__/normalize.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,23 @@ it('keeps custom project id based on the projects rootDir', async () => {
101101
);
102102
});
103103

104+
it('validation warning occurs when options not for projects is set', async () => {
105+
const mockWarn = jest.mocked(console.warn).mockImplementation(() => {});
106+
const rootDir = '/root/path/foo';
107+
const {options} = await normalize(
108+
{
109+
bail: true, // an option not for projects
110+
rootDir,
111+
},
112+
{} as Config.Argv,
113+
rootDir,
114+
1,
115+
true, // isProjectOptions
116+
);
117+
118+
expect(mockWarn).toHaveBeenCalledTimes(1);
119+
});
120+
104121
it('keeps custom ids based on the rootDir', async () => {
105122
const {options} = await normalize(
106123
{

0 commit comments

Comments
 (0)