Browse Source

t.truthy should be t.true

pull/49/head
Luke Childs 7 years ago
parent
commit
ed98a60e39
  1. 2
      test/base-url.js
  2. 6
      test/cache.js
  3. 4
      test/endpoints.js
  4. 4
      test/errors.js
  5. 4
      test/queries.js

2
test/base-url.js

@ -15,5 +15,5 @@ test('Can pass in custom endpoint', async t => {
const response = await onionoo[defaultEndpoint]();
t.deepEqual(response.body, data.dummyResponse);
t.truthy(scope.isDone());
t.true(scope.isDone());
});

6
test/cache.js

@ -20,7 +20,7 @@ test('Cache is disabled by default', async t => {
const response = await onionoo[defaultEndpoint]();
t.false(response.fromCache);
t.truthy(scope.isDone());
t.true(scope.isDone());
const scope2 = nock(data.defaultBaseUrl)
.get(`/${defaultEndpoint}`)
@ -29,7 +29,7 @@ test('Cache is disabled by default', async t => {
const response2 = await onionoo[defaultEndpoint]();
t.false(response2.fromCache);
t.truthy(scope2.isDone());
t.true(scope2.isDone());
});
test('Cache options is passed through to Got', async t => {
@ -49,7 +49,7 @@ test('Cache options is passed through to Got', async t => {
const response = await onionoo[defaultEndpoint]();
t.false(response.fromCache);
t.truthy(scope.isDone());
t.true(scope.isDone());
const response2 = await onionoo[defaultEndpoint]();

4
test/endpoints.js

@ -20,7 +20,7 @@ test('Default endpoint makes correct request', async t => {
const response = await onionoo[defaultEndpoint]();
t.deepEqual(response.body, data.dummyResponse);
t.truthy(scope.isDone());
t.true(scope.isDone());
});
test('Can pass in custom endpoint array', t => {
@ -44,5 +44,5 @@ test('Custom endpoint makes correct request', async t => {
const response = await onionoo[customEndpoint]();
t.deepEqual(response.body, data.dummyResponse);
t.truthy(scope.isDone());
t.true(scope.isDone());
});

4
test/errors.js

@ -17,7 +17,7 @@ test('Handle HTML responses for errors', async t => {
t.deepEqual(err.response.body, data.dummy400Response);
}
t.truthy(scope.isDone());
t.true(scope.isDone());
});
test('Throw useful errors for HTTP response codes', async t => {
@ -43,7 +43,7 @@ test('Throw useful errors for HTTP response codes', async t => {
t.is(err.statusCode, parseInt(responseCode, 10));
t.is(err.statusMessage, responseCodes[responseCode]);
}
t.truthy(scope.isDone());
t.true(scope.isDone());
});
await Promise.all(requests);

4
test/queries.js

@ -14,7 +14,7 @@ test('Query string is built correctly', async t => {
const response = await onionoo[defaultEndpoint]({foo: 'bar'});
t.deepEqual(response.body, data.dummyResponse);
t.truthy(scope.isDone());
t.true(scope.isDone());
});
test('":" char isn\'t url encoded so filters work', async t => {
@ -28,5 +28,5 @@ test('":" char isn\'t url encoded so filters work', async t => {
const response = await onionoo[defaultEndpoint]({foo: 'key:value'});
t.deepEqual(response.body, data.dummyResponse);
t.truthy(scope.isDone());
t.true(scope.isDone());
});

Loading…
Cancel
Save