Skip to content

Commit 69442b1

Browse files
committed
chore: resolve lint findings
1 parent 117a6c6 commit 69442b1

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/action.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ describe("Action", () => {
110110
it("should throw if invalid workflow inputs JSON is provided", () => {
111111
mockEnvConfig.workflow_inputs = "{";
112112

113-
expect(() => getConfig()).toThrowError();
113+
expect(() => getConfig()).toThrow(Error);
114114
});
115115

116116
it("should handle workflow inputs JSON containing strings numbers or booleans", () => {
117117
mockEnvConfig.workflow_inputs =
118118
'{"cake":"delicious","pie":9001,"parfait":false}';
119119

120-
expect(() => getConfig()).not.toThrowError();
120+
expect(() => getConfig()).not.toThrow(Error);
121121
});
122122

123123
it("should throw if a workflow inputs JSON doesn't contain strings numbers or booleans", () => {
@@ -128,7 +128,7 @@ describe("Action", () => {
128128
const callAndAssert = (input: string, errorMsg: string) => {
129129
debugMock.mockClear();
130130
mockEnvConfig.workflow_inputs = input;
131-
expect(() => getConfig()).toThrowError(errorMsg);
131+
expect(() => getConfig()).toThrow(errorMsg);
132132
expect(debugMock).toHaveBeenCalledOnce();
133133
};
134134

src/return-dispatch.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ describe("return-dispatch", () => {
102102
const workflowIdPromise = getWorkflowId("hello.yml");
103103

104104
// Behaviour
105-
await expect(workflowIdPromise).rejects.toThrowError();
105+
await expect(workflowIdPromise).rejects.toThrow(Error);
106106

107107
// Logging
108108
assertOnlyCalled(coreInfoLogMock);
@@ -378,7 +378,7 @@ describe("return-dispatch", () => {
378378

379379
await expect(() =>
380380
attemptToFindRunId(new RegExp(testId), [0]),
381-
).rejects.toThrowError(unhandledError);
381+
).rejects.toThrow(unhandledError);
382382

383383
// Behaviour
384384
expect(getWorkflowRunJobStepMock).toHaveBeenCalledOnce();

0 commit comments

Comments
 (0)