@@ -12,7 +12,6 @@ import {
1212 CloudDpopProofError ,
1313 CloudDpopStorageError ,
1414 createDpopProof ,
15- DpopStoredPublicKeyMismatchError ,
1615 generateDpopProofKeyPair ,
1716 isCloudDpopError ,
1817 loadOrCreateDpopProofKeyPair ,
@@ -104,13 +103,11 @@ describe("mobile DPoP", () => {
104103 operation : "decode" ,
105104 storageKey : "t3code.cloud.dpop-proof-key" ,
106105 } ) ;
107- expect ( error . cause ) . toMatchObject ( { _tag : "SchemaError" } ) ;
108- expect ( error . message ) . not . toContain ( String ( error . cause ) ) ;
109106 expect ( isCloudDpopError ( error ) ) . toBe ( true ) ;
110107 } ) . pipe ( Effect . provide ( cryptoLayer ) ) ,
111108 ) ;
112109
113- it . effect ( "preserves a structured cause when stored key material does not match" , ( ) =>
110+ it . effect ( "rejects stored key material whose public coordinates do not match" , ( ) =>
114111 Effect . gen ( function * ( ) {
115112 secureStore . clear ( ) ;
116113 const generated = yield * generateDpopProofKeyPair ( ) ;
@@ -126,11 +123,10 @@ describe("mobile DPoP", () => {
126123 operation : "restore" ,
127124 storageKey : "t3code.cloud.dpop-proof-key" ,
128125 } ) ;
129- expect ( error . cause ) . toBeInstanceOf ( DpopStoredPublicKeyMismatchError ) ;
130126 } ) . pipe ( Effect . provide ( cryptoLayer ) ) ,
131127 ) ;
132128
133- it . effect ( "preserves request context and the parser cause for an invalid proof URL" , ( ) =>
129+ it . effect ( "preserves request context for an invalid proof URL" , ( ) =>
134130 Effect . gen ( function * ( ) {
135131 const proofKey = yield * generateDpopProofKeyPair ( ) ;
136132 const error = yield * createDpopProof ( {
@@ -147,8 +143,6 @@ describe("mobile DPoP", () => {
147143 urlLength : "http://" . length ,
148144 thumbprint : proofKey . thumbprint ,
149145 } ) ;
150- expect ( error . cause ) . toBeInstanceOf ( Error ) ;
151- expect ( error . message ) . not . toContain ( ( error . cause as Error ) . message ) ;
152146 expect ( isCloudDpopError ( error ) ) . toBe ( true ) ;
153147 } ) . pipe ( Effect . provide ( cryptoLayer ) ) ,
154148 ) ;
@@ -174,7 +168,6 @@ describe("mobile DPoP", () => {
174168 urlLength : url . length ,
175169 thumbprint : proofKey . thumbprint ,
176170 } ) ;
177- expect ( error . cause ) . toMatchObject ( { _tag : "EncodingError" } ) ;
178171 expect ( error ) . not . toHaveProperty ( "url" ) ;
179172 expect ( error . message ) . not . toContain ( "user" ) ;
180173 expect ( error . message ) . not . toContain ( "password" ) ;
0 commit comments