File tree Expand file tree Collapse file tree
packages/node/test/e2e/cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,22 @@ import type { OutputEntry } from './test-utils.ts'
77import { hasTransloaditCredentials , testCase } from './test-utils.ts'
88
99const describeLive = hasTransloaditCredentials ? describe : describe . skip
10+ const volatileNotifyFields = [
11+ 'notify_start' ,
12+ 'notify_status' ,
13+ 'notify_response_code' ,
14+ 'notify_response_data' ,
15+ 'notify_duration' ,
16+ ] as const
17+
18+ function normalizeAssemblyForAssertion < T extends Record < string , unknown > > ( assembly : T ) : T {
19+ const normalized = { ...assembly }
20+ for ( const field of volatileNotifyFields ) {
21+ delete normalized [ field ]
22+ }
23+
24+ return normalized
25+ }
1026
1127describeLive ( 'assemblies' , ( ) => {
1228 describe ( 'get' , ( ) => {
@@ -35,7 +51,9 @@ describeLive('assemblies', () => {
3551 for ( const [ expectation , actual ] of zip ( expectations , actuals ) ) {
3652 expect ( actual ) . to . have . lengthOf ( 1 )
3753 expect ( actual ) . to . have . nested . property ( '[0].type' ) . that . equals ( 'print' )
38- expect ( actual ) . to . have . nested . property ( '[0].json' ) . that . deep . equals ( expectation )
54+ expect ( normalizeAssemblyForAssertion ( actual [ 0 ] . json ?? { } ) ) . to . deep . equal (
55+ normalizeAssemblyForAssertion ( expectation ) ,
56+ )
3957 }
4058 } ) ,
4159 )
You can’t perform that action at this time.
0 commit comments