Skip to content

Commit a41c523

Browse files
authored
Fix leaky unit test (#8972)
1 parent ecbbc91 commit a41c523

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/init/features/dataconnect/sdk.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as fs from "fs";
1+
import * as fs from "fs-extra";
22
import * as sinon from "sinon";
33
import { expect } from "chai";
44

@@ -21,6 +21,7 @@ describe("init dataconnect:sdk", () => {
2121

2222
beforeEach(() => {
2323
fsStub = sandbox.stub(fs, "writeFileSync");
24+
sandbox.stub(fs, "ensureFileSync").returns();
2425
generateStub = sandbox.stub(DataConnectEmulator, "generate");
2526
emptyConfig = new Config({}, { projectDir: process.cwd() });
2627
});

0 commit comments

Comments
 (0)