(endpoint: string, query: Query, returnValue: any)
| 25 | private expects: {endpoint: string, query: Query}[] = []; |
| 26 | |
| 27 | when(endpoint: string, query: Query, returnValue: any) { |
| 28 | for (const mock of this.mocks) { |
| 29 | if (mock.endpoint === endpoint && mock.query === query) { |
| 30 | mock.returnValue = returnValue; |
| 31 | return; |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | this.mocks.push({endpoint: endpoint, query: query, returnValue: returnValue}); |
| 36 | } |
| 37 | |
| 38 | expect(endpoint: string, query: Query, returnValue: any) { |
| 39 | this.expects.push({endpoint: endpoint, query: query}); |
no test coverage detected