@@ -142,7 +142,7 @@ const ids = (rows: Row[]) => rows.map((r) => r.id).sort();
142142describe ( 'a cascade dependent\'s ERR_SUMMARY_RECOMPUTE never answers for a parent delete that did not land' , ( ) => {
143143 it ( 'atomic plan: the parent delete refuses with another error, and nothing stored changes' , async ( ) => {
144144 const { engine, driver } = await makeEngine ( true ) ;
145- const err : any = await engine . delete ( 'acct' , { where : { id : 'a1' } } as any ) . then ( ( ) => null , ( e : unknown ) => e ) ;
145+ const err : any = await engine . delete ( 'acct' , { where : { id : 'a1' } } ) . then ( ( ) => null , ( e : unknown ) => e ) ;
146146 expect ( err ) . toBeInstanceOf ( Error ) ;
147147 expect ( err . code ) . toBeUndefined ( ) ;
148148 expect ( err . cause ?. code ) . toBe ( 'ERR_SUMMARY_RECOMPUTE' ) ;
@@ -154,7 +154,7 @@ describe('a cascade dependent\'s ERR_SUMMARY_RECOMPUTE never answers for a paren
154154
155155 it ( 'a runtime that cannot roll back: the parent is still stored, and the caller is refused' , async ( ) => {
156156 const { engine, driver } = await makeEngine ( false ) ;
157- const err : any = await engine . delete ( 'acct' , { where : { id : 'a1' } } as any ) . then ( ( ) => null , ( e : unknown ) => e ) ;
157+ const err : any = await engine . delete ( 'acct' , { where : { id : 'a1' } } ) . then ( ( ) => null , ( e : unknown ) => e ) ;
158158 expect ( err ) . toBeInstanceOf ( Error ) ;
159159 expect ( err . code ) . toBeUndefined ( ) ;
160160 expect ( err . cause ?. code ) . toBe ( 'ERR_SUMMARY_RECOMPUTE' ) ;
@@ -165,7 +165,7 @@ describe('a cascade dependent\'s ERR_SUMMARY_RECOMPUTE never answers for a paren
165165
166166 it ( 'a predicate delete (multi) on a runtime that cannot roll back: refused the same way, the parent still stored' , async ( ) => {
167167 const { engine, driver } = await makeEngine ( false ) ;
168- const err : any = await engine . delete ( 'acct' , { where : { name : 'A' } , multi : true } as any ) . then ( ( ) => null , ( e : unknown ) => e ) ;
168+ const err : any = await engine . delete ( 'acct' , { where : { name : 'A' } , multi : true } ) . then ( ( ) => null , ( e : unknown ) => e ) ;
169169 expect ( err ) . toBeInstanceOf ( Error ) ;
170170 expect ( err . code ) . toBeUndefined ( ) ;
171171 expect ( err . cause ?. code ) . toBe ( 'ERR_SUMMARY_RECOMPUTE' ) ;
@@ -175,7 +175,7 @@ describe('a cascade dependent\'s ERR_SUMMARY_RECOMPUTE never answers for a paren
175175 it ( 'a caller\'s own transaction that the refusal rolls back: refused with another error, nothing stored' , async ( ) => {
176176 const { engine, driver } = await makeEngine ( true ) ;
177177 const err : any = await engine
178- . transaction ( async ( trx : any ) => engine . delete ( 'line' , { where : { id : 'l1' } , context : trx } as any ) )
178+ . transaction ( async ( trx : any ) => engine . delete ( 'line' , { where : { id : 'l1' } , context : trx } ) )
179179 . then ( ( ) => null , ( e : unknown ) => e ) ;
180180 expect ( err ) . toBeInstanceOf ( Error ) ;
181181 expect ( err . code ) . toBeUndefined ( ) ;
@@ -199,7 +199,7 @@ describe('a cascade dependent\'s ERR_SUMMARY_RECOMPUTE never answers for a paren
199199
200200 it ( 'CONTROL the dependent\'s own delete landed: ERR_SUMMARY_RECOMPUTE, carrying its result' , async ( ) => {
201201 const { engine, driver } = await makeEngine ( true ) ;
202- const err : any = await engine . delete ( 'line' , { where : { id : 'l1' } } as any ) . then ( ( ) => null , ( e : unknown ) => e ) ;
202+ const err : any = await engine . delete ( 'line' , { where : { id : 'l1' } } ) . then ( ( ) => null , ( e : unknown ) => e ) ;
203203 expect ( err ?. code ) . toBe ( 'ERR_SUMMARY_RECOMPUTE' ) ;
204204 expect ( err . written ) . toBe ( true ) ;
205205 expect ( ids ( driver . rowsOf ( 'line' ) ) ) . toEqual ( [ 'l2' ] ) ;
@@ -209,7 +209,7 @@ describe('a cascade dependent\'s ERR_SUMMARY_RECOMPUTE never answers for a paren
209209 const { engine, driver } = await makeEngine ( true ) ;
210210 let caught : any ;
211211 await engine . transaction ( async ( trx : any ) => {
212- await engine . delete ( 'line' , { where : { id : 'l1' } , context : trx } as any ) . catch ( ( e : unknown ) => { caught = e ; } ) ;
212+ await engine . delete ( 'line' , { where : { id : 'l1' } , context : trx } ) . catch ( ( e : unknown ) => { caught = e ; } ) ;
213213 } ) ;
214214 expect ( caught ?. code ) . toBe ( 'ERR_SUMMARY_RECOMPUTE' ) ;
215215 expect ( driver . rolledBack ) . toHaveLength ( 0 ) ;
0 commit comments