test: remove loop over single element · nodejs/node@d0302e7

Original file line numberDiff line numberDiff line change

@@ -561,17 +561,14 @@ for (const test of TEST_CASES) {

561561

const iv = Buffer.alloc(12);

562562

const opts = { authTagLength: 10 };

563563
564-

for (const cipher of [

565-

crypto.createCipheriv(algo, key, iv, opts),

566-

]) {

567-

assert.throws(() => {

568-

cipher.final();

569-

}, hasOpenSSL3 ? {

570-

code: 'ERR_OSSL_TAG_NOT_SET'

571-

} : {

572-

message: /Unsupported state/

573-

});

574-

}

564+

const cipher = crypto.createCipheriv(algo, key, iv, opts);

565+

assert.throws(() => {

566+

cipher.final();

567+

}, hasOpenSSL3 ? {

568+

code: 'ERR_OSSL_TAG_NOT_SET'

569+

} : {

570+

message: /Unsupported state/

571+

});

575572

}

576573
577574

{