You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: 100% coverage for tslib.ts (error case) (#399)
- use Jest's module mocks to test the error case of `tslib.ts` when `tslib` fails to import
- this took a bit of work to figure out bc, per the in-line comments, the ordering and module subpath were both _required_
- it was pretty confusing for a while until I realized what might be going wrong
// the error case _must_ come first because order matters for module mocks
7
+
test("tslib - errors",async()=>{
8
+
jest.mock("tslib/package.json",()=>undefined);// mock the module subpath bc we actually never import "tslib" directly. module mocks only work on exact match
0 commit comments