Skip to content

Commit 2991604

Browse files
author
Martin Raag
committed
Fix test naming
These tests expect the promise to be rejected, not a falsey value to be returned
1 parent 4de3136 commit 2991604

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/authentication-test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ tape.test('if valid token and valid scope then resolve decoded token', function(
177177
});
178178
});
179179

180-
tape.test('if invalid token and valid scope then false', function(t) {
180+
tape.test('if invalid token and valid scope then reject', function(t) {
181181

182182
const authPromise = auth.authenticate('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ0ZXN0QHRlc3QuY29tIiwic2NvcGUiOlsidGVzdGVyIl19.ZzBZRdxQHFemCW2TwwFRn8Jk-uWt-OLtsi6O5pWpM34' + 'foo', {
183183
scope: ['admin'],
@@ -194,7 +194,7 @@ tape.test('if invalid token and valid scope then false', function(t) {
194194
});
195195
});
196196

197-
tape.test('if valid token and invalid scope then false', function(t) {
197+
tape.test('if valid token and invalid scope then reject', function(t) {
198198

199199
const authPromise = auth.authenticate('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ0ZXN0QHRlc3QuY29tIiwic2NvcGUiOlsidGVzdGVyIl19.ZzBZRdxQHFemCW2TwwFRn8Jk-uWt-OLtsi6O5pWpM34', {
200200
scope: ['admin']

0 commit comments

Comments
 (0)