forked from Doragon-RH/poker-procon-1.0.0
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.setup.ts
36 lines (31 loc) · 783 Bytes
/
jest.setup.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import '@testing-library/jest-dom';
import type { TestingLibraryMatchers } from '@testing-library/jest-dom/matchers';
declare module 'expect' {
interface Matchers<R extends void | Promise<void>, T = unknown>
extends TestingLibraryMatchers<typeof expect.stringContaining, R> {}
}
jest.mock('winston', () => {
const debug = jest.fn();
const info = jest.fn();
const error = jest.fn();
const logger = {
debug,
info,
error,
};
return {
format: {
colorize: jest.fn(),
combine: jest.fn(),
label: jest.fn(),
timestamp: jest.fn(),
printf: jest.fn(),
prettyPrint: jest.fn(),
},
createLogger: jest.fn().mockReturnValue(logger),
transports: {
Console: jest.fn(),
File: jest.fn(),
},
};
});