@@ -11,13 +11,6 @@ describe('seal', () => {
1111 expect ( sealed ) . toContain ( '~2' ) ;
1212 expect ( sealed . startsWith ( 'Fe26.2*' ) ) . toBe ( true ) ;
1313 } ) ;
14-
15- it ( 'seals with TTL' , async ( ) => {
16- const data = { foo : 'bar' } ;
17- const sealed = await sealData ( data , { password, ttl : 3600 } ) ;
18-
19- expect ( sealed ) . toContain ( '~2' ) ;
20- } ) ;
2114 } ) ;
2215
2316 describe ( 'unsealData' , ( ) => {
@@ -41,20 +34,6 @@ describe('seal', () => {
4134 expect ( unsealed ) . toEqual ( data ) ;
4235 } ) ;
4336
44- it ( 'handles seals with TTL (expiration embedded in seal)' , async ( ) => {
45- const data = { foo : 'bar' } ;
46- // Seal with TTL - expiration timestamp is embedded in the seal
47- const sealed = await sealData ( data , { password, ttl : 3600 } ) ;
48-
49- // Verify expiration field is present (5th component, non-empty)
50- const parts = sealed . split ( '~' ) [ 0 ] . split ( '*' ) ;
51- expect ( parts [ 5 ] ) . toMatch ( / ^ \d + $ / ) ; // Non-empty expiration timestamp
52-
53- // Should unseal successfully within TTL window
54- const unsealed = await unsealData ( sealed , { password } ) ;
55- expect ( unsealed ) . toEqual ( data ) ;
56- } ) ;
57-
5837 it ( 'returns empty object for bad password' , async ( ) => {
5938 const data = { foo : 'bar' } ;
6039 const sealed = await sealData ( data , { password } ) ;
0 commit comments