Issue :
Given a type declaration in core code, and a reference to that type definition in jest code, type-safety is not always enforced.
Expected behavior :
Changes to type definitions should be detected (failing to compile where appropriate).
Minimal repo :
- Unzip the attached zip file and run yarn and then yarn test (should succeed).
- Change the type definition in thing.ts to contain
b: number
- Run yarn test again. Due to the cache, it succeeds and should not. It will (correctly) fail if you remove the cache folder "jestCache"
thing.ts contains:
export type Thing = {
a: number;
// b: number;
};
thing.test.ts contains:
export const thing: Thing = { a: 1 };
jestCache.zip
Issue :
Given a type declaration in core code, and a reference to that type definition in jest code, type-safety is not always enforced.
Expected behavior :
Changes to type definitions should be detected (failing to compile where appropriate).
Minimal repo :
b: numberthing.ts contains:
thing.test.ts contains:
jestCache.zip