Skip to content

Commit df0b3b4

Browse files
committed
reset spy history
1 parent 5428434 commit df0b3b4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/core/src/test/shared/sam/build.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,15 +332,16 @@ describe('SAM runBuild', () => {
332332
})
333333

334334
afterEach(() => {
335+
spyRunInterminal.resetHistory()
335336
sandbox.restore()
336337
})
337338

338339
const verifyCorrectDependencyCall = () => {
339340
// Prefer count comparison for debugging flakiness
340-
assert.strictEqual(mockGetSamCliPath.callCount, 1)
341-
assert.strictEqual(mockChildProcessClass.callCount, 1)
342-
assert.strictEqual(mockGetSpawnEnv.callCount, 1)
343-
assert.strictEqual(spyRunInterminal.callCount, 1)
341+
assert.strictEqual(1, mockGetSamCliPath.callCount, 'GetSamCliPath')
342+
assert.strictEqual(1, mockChildProcessClass.callCount, 'ChildProcessClass')
343+
assert.strictEqual(1, mockGetSpawnEnv.callCount, 'GetSpawnEnv')
344+
assert.strictEqual(1, spyRunInterminal.callCount, 'RunInterminal')
344345
assert.deepEqual(spyRunInterminal.getCall(0).args, [mockSamBuildChildProcess, 'build'])
345346
}
346347

@@ -527,6 +528,7 @@ describe('SAM runBuild', () => {
527528
},
528529
},
529530
])
531+
530532
verifyCorrectDependencyCall()
531533
prompterTester.assertCallAll()
532534
})

0 commit comments

Comments
 (0)