Browse Source

Await assertions otherwise AVA 0.19.0 will fail the test

pull/36/head
Luke Childs 8 years ago
parent
commit
dc7666a84c
  1. 4
      test/errors.js

4
test/errors.js

@ -31,7 +31,7 @@ test('Throw useful errors for HTTP response codes', async t => {
503: 'Service Unavailable'
};
Object.keys(responseCodes).forEach(async responseCode => {
const requests = Object.keys(responseCodes).map(async responseCode => {
const scope = nock(data.defaultBaseUrl)
.get(`/${defaultEndpoint}`)
.reply(responseCode);
@ -45,4 +45,6 @@ test('Throw useful errors for HTTP response codes', async t => {
}
t.truthy(scope.isDone());
});
await Promise.all(requests);
});

Loading…
Cancel
Save