Skip to content

Commit 265988f

Browse files
committed
fix(ci): use node test environment for encryption tests
Node 20's Web Crypto API rejects JSDOM cross-realm ArrayBuffer objects. Adding @jest-environment node to encryption.test.ts ensures the tests run in Node's native environment, bypassing the JSDOM realm mismatch. These tests don't need a DOM and are pure crypto operations.
1 parent a227004 commit 265988f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

frontend/src/utils/__tests__/encryption.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
// src/utils/__tests__/encryption.test.ts
2+
/**
3+
* @jest-environment node
4+
*/
5+
26
/**
37
* Client-Side Encryption Unit Tests
48
* ═══════════════════════════════════════════════════════════════════════════════

0 commit comments

Comments
 (0)