Skip to content

Commit

Permalink
test: try fix flaky test
Browse files Browse the repository at this point in the history
Not sure if this fixes aws#4390, but we now
reuse the same sandbox instead of recreating it
each time. We were failing a test where a spied method
was being called more than expected.

Signed-off-by: nkomonen <[email protected]>
  • Loading branch information
nkomonen-amazon committed Feb 13, 2024
1 parent a8a6d6b commit 870f494
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/toolkit/src/test/srcShared/fs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ describe('FileSystem', function () {

before(async function () {
fakeContext = await FakeExtensionContext.create()
sandbox = Sinon.createSandbox()
await deleteTestRoot() // incase a previous test run failed to clean
})

beforeEach(async function () {
await makeTestRoot()
sandbox = Sinon.createSandbox()
})

afterEach(async function () {
Expand Down

0 comments on commit 870f494

Please sign in to comment.