Fix test in HTTPClientMock.test.ts

This commit is contained in:
Jerko Steiner 2019-04-01 14:24:47 +08:00
parent 31bb2aa5ee
commit 61e7e8db4f

View File

@ -30,8 +30,9 @@ describe('HTTPClientMock', () => {
{method: 'get', url: '/test'},
{error: 'Internal'}, 500)
const errorPromise = http.get('/test')
const waitPromise = http.wait()
const error = await getError(http.get('/test'))
const error = await getError(errorPromise)
const error2 = await getError(waitPromise)
expect(error.message).toEqual('HTTP Status: 500')
expect(error2).toBe(error)