Skip to content

Commit

Permalink
test: try fix flaky test (#4429)
Browse files Browse the repository at this point in the history
Not sure if this fixes #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 authored Feb 14, 2024
1 parent eb0ddda commit dd82987
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 dd82987

Please sign in to comment.