Skip to content

Commit affc727

Browse files
chore: fix unit test creating dirs in the cwd
A unit test messes up the current working directory by creating dir there and does not clean it up. Use temp dir for the test.
1 parent 596c651 commit affc727

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/ios-project-service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,8 +879,9 @@ describe("handleNativeDependenciesChange", () => {
879879
it("ensure the correct order of pod install and merging pod's xcconfig file", async () => {
880880
const executedCocoapodsMethods: string[] = [];
881881
const projectPodfilePath = "my/test/project/platforms/ios/Podfile";
882+
const dir = temp.mkdirSync("myTestProjectPath");
882883

883-
const testInjector = createTestInjector("myTestProjectPath", "myTestProjectName");
884+
const testInjector = createTestInjector(dir, "myTestProjectName");
884885
const iOSProjectService = testInjector.resolve("iOSProjectService");
885886
const projectData = testInjector.resolve("projectData");
886887

0 commit comments

Comments
 (0)