Skip to content

Commit 2dfab6d

Browse files
Merge pull request #2322 from intuit/fix-test
fix test
2 parents 507dde3 + e54113e commit 2dfab6d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

plugins/all-contributors/__tests__/all-contributors.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const addContributorMock = jest.fn();
1717
const envMock = jest.fn();
1818
const gitShow = jest.fn();
1919
const writeMock = jest.fn();
20+
const existsSync = jest.fn().mockReturnValue(true);
2021
const getLernaPackages = jest.fn();
2122

2223
envMock.mockReturnValue({});
@@ -51,6 +52,7 @@ const mockRead = (result: string) =>
5152
.mockReturnValueOnce(result);
5253

5354
jest.spyOn(fs, "writeFileSync").mockImplementation(writeMock);
55+
jest.spyOn(fs, "existsSync").mockImplementation(existsSync);
5456

5557
describe("All Contributors Plugin", () => {
5658
afterEach(() => {

0 commit comments

Comments
 (0)