Skip to content

Commit b5ebb78

Browse files
committed
test: ✅ fix matchers typing issue due to ambient typing in observe.ts
1 parent 27f0bc4 commit b5ebb78

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

libs/testing/src/observe.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/// <reference types="vitest/globals" />
2-
/// <reference types="jest" />
3-
41
import type { Mock } from 'vitest';
52
import { Observable, Unsubscribable } from 'rxjs';
63

@@ -65,3 +62,9 @@ function createSpy<PARAMS extends unknown[], RETURN>(): Mock<
6562
? (jest.fn() as unknown as Mock<(...args: PARAMS) => RETURN>)
6663
: g.vi.fn();
6764
}
65+
66+
declare global {
67+
const jest: {
68+
fn: () => Mock<(...args: unknown[]) => unknown>;
69+
};
70+
}

libs/testing/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"noPropertyAccessFromIndexSignature": true,
99
"noImplicitReturns": true,
1010
"noFallthroughCasesInSwitch": true,
11-
"module": "preserve"
11+
"module": "preserve",
12+
"lib": ["esnext"]
1213
},
1314
"angularCompilerOptions": {
1415
"enableI18nLegacyMessageIdFormat": false,

0 commit comments

Comments
 (0)