@@ -15,10 +15,16 @@ import * as HPKE from '../index.ts'
1515import { supported } from './support.ts'
1616
1717test . describe ( 'Buffer.prototype.slice() compatibility' , ( ) => {
18- const run = supported . KEM_MLKEM768_X25519 ! ( ) ? it : it . skip
18+ const hybridKemOptions = {
19+ skip : supported . KEM_MLKEM768_X25519 ! ( )
20+ ? false
21+ : 'KEM_MLKEM768_X25519 is unsupported in this runtime' ,
22+ } satisfies test . TestOptions
23+
1924 test . describe ( 'Hybrid KEM DeserializePrivateKey' , ( ) => {
20- run (
25+ it (
2126 'should not be affected by modifications to the original Buffer after deserialization' ,
27+ hybridKemOptions ,
2228 async ( ) => {
2329 const suite = new HPKE . CipherSuite (
2430 HPKE . KEM_MLKEM768_X25519 ,
@@ -55,7 +61,7 @@ test.describe('Buffer.prototype.slice() compatibility', () => {
5561 } )
5662
5763 test . describe ( 'Hybrid KEM Decap (split function)' , ( ) => {
58- run ( 'should use copied data, not views that can be corrupted' , async ( ) => {
64+ it ( 'should use copied data, not views that can be corrupted' , hybridKemOptions , async ( ) => {
5965 const suite = new HPKE . CipherSuite (
6066 HPKE . KEM_MLKEM768_X25519 ,
6167 HPKE . KDF_HKDF_SHA256 ,
@@ -93,8 +99,9 @@ test.describe('Buffer.prototype.slice() compatibility', () => {
9399 } )
94100
95101 test . describe ( 'Hybrid KEM SerializePrivateKey (getSeed)' , ( ) => {
96- run (
102+ it (
97103 'should return independent copies that do not share memory with internal state' ,
104+ hybridKemOptions ,
98105 async ( ) => {
99106 const suite = new HPKE . CipherSuite (
100107 HPKE . KEM_MLKEM768_X25519 ,
0 commit comments