Skip to content

Commit

Permalink
Revert "test: fix test under lts/erbium"
Browse files Browse the repository at this point in the history
This reverts commit 22275c7.
  • Loading branch information
panva committed Oct 25, 2023
1 parent 61bd2a0 commit b64b6c7
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions test/jwt/sign.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,8 @@ async function testJWTsetFunction(t, method, claim, value, expected = value) {
t.true(claim in claims)
t.is(claims[claim], expected)
}

function getTypeOf(input) {
try {
return input.constructor.name
} catch {
return typeof input
}
}

testJWTsetFunction.title = (title, method, claim, value) =>
`SignJWT.prototype.${method} called with ${getTypeOf(value)}`
`SignJWT.prototype.${method} called with ${value?.constructor?.name || typeof value}`

test(testJWTsetFunction, 'setIssuer', 'iss', 'urn:example:issuer')
test(testJWTsetFunction, 'setSubject', 'sub', 'urn:example:subject')
Expand Down

0 comments on commit b64b6c7

Please sign in to comment.