Skip to content

Commit

Permalink
chore: bump tap to 15.0.2 (#49)
Browse files Browse the repository at this point in the history
* chore: bump tap to 15.0.2

* fix: move tap to devDependencies

* fix: deprecation warnings
  • Loading branch information
jackmurdoch committed Apr 7, 2021
1 parent 153014e commit 14e4be8
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
"nock": "^13.0.7",
"prettier": "^2.2.1",
"sinon": "^10.0.0",
"tap": "^14.11.0"
"tap": "^15.0.2"
}
}
2 changes: 1 addition & 1 deletion test/cache.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ t.test(
t.ok(publicKey)
t.ok(jwk)
t.equal(publicKey, jwkToPem(jwk))
t.deepEqual(jwk, localKey)
t.same(jwk, localKey)
}
)

Expand Down
3 changes: 1 addition & 2 deletions test/fast-jwt-integration.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@ t.test('fast-jwt integration tests', async t => {
const verifyWithPromise = createVerifier({ key: publicKey })
const payload = await verifyWithPromise(token)

t.strictEqual(payload.name, 'Jane Doe')
t.done()
t.equal(payload.name, 'Jane Doe')
})
10 changes: 4 additions & 6 deletions test/fastify-jwt-integrations.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ t.test('fastify-jwt integration tests', async t => {
},
})

t.strictEqual(response.statusCode, 200)
t.strictEqual(response.body, 'Jane Doe')
t.done()
t.equal(response.statusCode, 200)
t.equal(response.body, 'Jane Doe')
})

t.test('fastify-jwt integration tests with providerDiscovery', async t => {
Expand Down Expand Up @@ -95,7 +94,6 @@ t.test('fastify-jwt integration tests with providerDiscovery', async t => {
},
})

t.strictEqual(response.statusCode, 200)
t.strictEqual(response.body, 'Jane Doe')
t.done()
t.equal(response.statusCode, 200)
t.equal(response.body, 'Jane Doe')
})
8 changes: 4 additions & 4 deletions test/getJwk.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ t.test('returns a jwk if alg and kid match', async t => {
const jwk = await getJwks.getJwk({ domain, alg: key.alg, kid: key.kid })

t.ok(jwk)
t.deepEqual(jwk, key)
t.same(jwk, key)
})

t.test('returns a jwk if no alg is provided and kid match', async t => {
Expand All @@ -57,7 +57,7 @@ t.test('returns a jwk if no alg is provided and kid match', async t => {
const jwk = await getJwks.getJwk({ domain, kid: key.kid })

t.ok(jwk)
t.deepEqual(jwk, key)
t.same(jwk, key)
})

t.test('caches a successful response', async t => {
Expand All @@ -71,7 +71,7 @@ t.test('caches a successful response', async t => {
const jwk = await getJwks.getJwk({ domain, alg, kid })

t.ok(jwk)
t.deepEqual(jwk, key)
t.same(jwk, key)
})

t.test('does not cache a failed response', async t => {
Expand Down Expand Up @@ -159,7 +159,7 @@ t.test('returns a stale cached value if request fails', async t => {
kid: key1.kid,
})

t.sameStrict(key, key1)
t.strictSame(key, key1)
})

t.test('allowed domains', async t => {
Expand Down
8 changes: 4 additions & 4 deletions test/getJwkDiscovery.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ t.test('returns a jwk if alg and kid match for discovery', async t => {
const jwk = await getJwks.getJwk({ domain, alg: key.alg, kid: key.kid })

t.ok(jwk)
t.deepEqual(jwk, key)
t.same(jwk, key)
})

t.test('returns a jwk if no alg is provided and kid match for discovery', async t => {
Expand All @@ -63,7 +63,7 @@ t.test('returns a jwk if no alg is provided and kid match for discovery', async
const jwk = await getJwks.getJwk({ domain, kid: key.kid })

t.ok(jwk)
t.deepEqual(jwk, key)
t.same(jwk, key)
})

t.test('caches a successful response for discovery', async t => {
Expand All @@ -78,7 +78,7 @@ t.test('caches a successful response for discovery', async t => {
const jwk = await getJwks.getJwk({ domain, alg, kid })

t.ok(jwk)
t.deepEqual(jwk, key)
t.same(jwk, key)
})

t.test('does not cache a failed response for discovery', async t => {
Expand Down Expand Up @@ -186,7 +186,7 @@ t.test(
kid: key1.kid,
})

t.sameStrict(key, key1)
t.strictSame(key, key1)
}
)

Expand Down

0 comments on commit 14e4be8

Please sign in to comment.