diff --git a/packages/jest-config/src/__tests__/normalize.test.ts b/packages/jest-config/src/__tests__/normalize.test.ts index f3530f502f70..1000d1e10c14 100644 --- a/packages/jest-config/src/__tests__/normalize.test.ts +++ b/packages/jest-config/src/__tests__/normalize.test.ts @@ -1844,19 +1844,19 @@ describe('extensionsToTreatAsEsm', () => { }); describe('haste.enableSymlinks', () => { - it('should throw if watchman is not disabled', () => { - expect(() => + it('should throw if watchman is not disabled', async () => { + await expect( normalize({haste: {enableSymlinks: true}, rootDir: '/root/'}, {}), - ).toThrow('haste.enableSymlinks is incompatible with watchman'); + ).rejects.toThrow('haste.enableSymlinks is incompatible with watchman'); - expect(() => + await expect( normalize( {haste: {enableSymlinks: true}, rootDir: '/root/', watchman: true}, {}, ), - ).toThrow('haste.enableSymlinks is incompatible with watchman'); + ).rejects.toThrow('haste.enableSymlinks is incompatible with watchman'); - const {options} = normalize( + const {options} = await normalize( {haste: {enableSymlinks: true}, rootDir: '/root/', watchman: false}, {}, );