Skip to content

Commit

Permalink
test: use t.error (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak authored Dec 25, 2023
1 parent 6ab9ddb commit 2ea577c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/jwt.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ test('register', function (t) {
public: publicKey
}
}).ready(function (error) {
t.equal(error, undefined)
t.error(error)
})
})

Expand All @@ -88,7 +88,7 @@ test('register', function (t) {
fastify.register(jwt, {
secret: Buffer.from('some secret', 'base64')
}).ready(function (error) {
t.equal(error, undefined)
t.error(error)
})
})

Expand All @@ -98,7 +98,7 @@ test('register', function (t) {
fastify.register(jwt, {
secret: (request, token, callback) => { callback(null, Buffer.from('some secret', 'base64')) }
}).ready(function (error) {
t.equal(error, undefined)
t.error(error)
})
})

Expand All @@ -108,7 +108,7 @@ test('register', function (t) {
fastify.register(jwt, {
secret: (request, token) => Promise.resolve(Buffer.from('some secret', 'base64'))
}).ready(function (error) {
t.equal(error, undefined)
t.error(error)
})
})

Expand All @@ -118,7 +118,7 @@ test('register', function (t) {
fastify.register(jwt, {
secret: async (request, token) => Buffer.from('some secret', 'base64')
}).ready(function (error) {
t.equal(error, undefined)
t.error(error)
})
})

Expand Down Expand Up @@ -172,7 +172,7 @@ test('register', function (t) {
sub: 'Some subject'
}
}).ready(function (error) {
t.equal(error, undefined)
t.error(error)
})
})
})
Expand All @@ -194,7 +194,7 @@ test('register', function (t) {
allowedAud: 'Some audience'
}
}).ready(function (error) {
t.equal(error, undefined)
t.error(error)
})
})

Expand Down Expand Up @@ -223,7 +223,7 @@ test('register', function (t) {
allowedSub: 'Some subject'
}
}).ready(function (error) {
t.equal(error, undefined)
t.error(error)
})
})

Expand All @@ -249,7 +249,7 @@ test('register', function (t) {
allowedSub: 'Some subject'
}
}).ready(function (error) {
t.equal(error, undefined)
t.error(error)
})
})
})
Expand Down

0 comments on commit 2ea577c

Please sign in to comment.