-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathcustom.d.ts
38 lines (34 loc) · 980 Bytes
/
custom.d.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
37
38
import { Server } from 'http'
declare global {
namespace NodeJS {
interface Global {
// eslint-disable-next-line @typescript-eslint/member-delimiter-style
__appServer__: Server
}
}
// namespace jest {
// interface Matchers<R> {
// toContainObject(value: object): CustomMatcherResult;
// }
// }
}
// expect.extend({
// toContainObject(received, argument) {
// const pass = this.equals(received,
// expect.arrayContaining([
// expect.objectContaining(argument)
// ])
// )
// if (pass) {
// return {
// message: () => (`expected ${this.utils.printReceived(received)} not to contain object ${this.utils.printExpected(argument)}`),
// pass: true,
// }
// } else {
// return {
// message: () => (`expected ${this.utils.printReceived(received)} to contain object ${this.utils.printExpected(argument)}`),
// pass: false,
// }
// }
// }
// })