Skip to content

Commit

Permalink
Fix lint fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed Jul 12, 2024
1 parent fa845b7 commit 222ed7c
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions src/helpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,17 +416,20 @@ describe("getArgs", () => {
mockedWhich.sync.mockReturnValue("/path/to/which/pyright");

let callCount = 0;
mockedCp.execFileSync.mockImplementation((() => {
callCount += 1;
switch (callCount) {
case 1:
return `this is some junk\n\n*** downloading\npyright ooops\ndone`;
case 2:
return `this is some junk\n\n*** downloading\npyright ${latestPyright}\ndone`;
default:
throw new Error("should not have been called");
}
}) as any);
mockedCp.execFileSync.mockImplementation(
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
(() => {
callCount += 1;
switch (callCount) {
case 1:
return `this is some junk\n\n*** downloading\npyright ooops\ndone`;
case 2:
return `this is some junk\n\n*** downloading\npyright ${latestPyright}\ndone`;
default:
throw new Error("should not have been called");
}
}) as any,
);

const result = await getArgs(execPath);
expect(result).toMatchSnapshot("result");
Expand Down

0 comments on commit 222ed7c

Please sign in to comment.