Skip to content

Commit 0a81a9a

Browse files
committed
test: fixup to only call env.supported once in aes.ts
1 parent 085762f commit 0a81a9a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tap/aes.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ export default (
2020
'A256CBC-HS512',
2121
]
2222

23-
function title(algorithm: string) {
24-
const supported = env.supported(algorithm)
23+
function title(algorithm: string, supported = true) {
2524
let result = ''
2625
if (!supported) {
2726
result = '[not supported] '
@@ -54,7 +53,7 @@ export default (
5453
test(title(enc), execute)
5554
test(`${title(enc)} JWT`, jwt)
5655
} else {
57-
test(title(enc), async (t) => {
56+
test(title(enc, false), async (t) => {
5857
await t.rejects(execute(t))
5958
})
6059
}

0 commit comments

Comments
 (0)