@@ -36,7 +36,7 @@ import {
3636} from '@temporalio/workflow' ;
3737import { configurableHelpers , createTestWorkflowBundle } from './helpers-integration' ;
3838import * as activities from './activities' ;
39- import { cleanOptionalStackTrace , u8 , Worker } from './helpers' ;
39+ import { cleanOptionalStackTrace , compareStackTrace , u8 , Worker } from './helpers' ;
4040import { configMacro , makeTestFn } from './helpers-integration-multi-codec' ;
4141import * as workflows from './workflows' ;
4242
@@ -204,11 +204,12 @@ test.serial('activity-failure with ApplicationFailure', configMacro, async (t, c
204204 t . is ( err . cause . cause . message , 'Fail me' ) ;
205205 t . is ( err . cause . cause . type , 'Error' ) ;
206206 t . deepEqual ( err . cause . cause . details , [ 'details' , 123 , false ] ) ;
207- t . is (
208- cleanOptionalStackTrace ( err . cause . cause . stack ) ,
207+ compareStackTrace (
208+ t ,
209+ cleanOptionalStackTrace ( err . cause . cause . stack ) ! ,
209210 dedent `
210211 ApplicationFailure: Fail me
211- at Function .nonRetryable (common/src/failure.ts)
212+ at $CLASS .nonRetryable (common/src/failure.ts)
212213 at throwAnError (test/src/activities/index.ts)
213214 `
214215 ) ;
@@ -258,11 +259,12 @@ test.serial('child-workflow-failure', configMacro, async (t, config) => {
258259 return t . fail ( 'Expected err.cause.cause to be an instance of ApplicationFailure' ) ;
259260 }
260261 t . is ( err . cause . cause . message , 'failure' ) ;
261- t . is (
262- cleanOptionalStackTrace ( err . cause . cause . stack ) ,
262+ compareStackTrace (
263+ t ,
264+ cleanOptionalStackTrace ( err . cause . cause . stack ) ! ,
263265 dedent `
264266 ApplicationFailure: failure
265- at Function .nonRetryable (common/src/failure.ts)
267+ at $CLASS .nonRetryable (common/src/failure.ts)
266268 at throwAsync (test/src/workflows/throw-async.ts)
267269 `
268270 ) ;
0 commit comments