Skip to content

Commit

Permalink
Merge pull request #300 from ScottBrenner/fix-tests
Browse files Browse the repository at this point in the history
Fix failing tests
  • Loading branch information
NickLiffen authored Jul 18, 2023
2 parents 0480da7 + 81dc17b commit 30eb5af
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ module.exports = {
const cfnLint = isWindows() ? "cfn-lint.exe" : "cfn-lint";
fs.symlinkSync(
path.join(binPath, cfnLint),
path.join(symlinkPath, cfnLint)
path.join(symlinkPath, cfnLint),
);

return symlinkPath;
Expand All @@ -198,7 +198,7 @@ module.exports = {
return response;
} catch (e) {
core.error(
`Error running command: ${command}. Returned error is: ${e.message}`
`Error running command: ${command}. Returned error is: ${e.message}`,
);
throw e;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/installCLI.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = {
const cfnLint = isWindows() ? "cfn-lint.exe" : "cfn-lint";
fs.symlinkSync(
path.join(binPath, cfnLint),
path.join(symlinkPath, cfnLint)
path.join(symlinkPath, cfnLint),
);

return symlinkPath;
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/runCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
return response;
} catch (e) {
core.error(
`Error running command: ${command}. Returned error is: ${e.message}`
`Error running command: ${command}. Returned error is: ${e.message}`,
);
throw e;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/runCommand.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe("runCommand Test", () => {
it("Successfully handles failure CFN-Lint Command", async () => {
const command = { command: "cfn-lint -t ./template.yml" };
const expectedReturnValue = new Error(
"You have Errors in your Cloud Formation"
"You have Errors in your Cloud Formation",
);

jest.spyOn(exec, "exec").mockImplementation(() => {
Expand All @@ -35,7 +35,7 @@ describe("runCommand Test", () => {
await runCommand(command);
} catch (e) {
expect(e.message).toStrictEqual(
"You have Errors in your Cloud Formation"
"You have Errors in your Cloud Formation",
);
expect(log).toHaveBeenCalledTimes(1);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/setup.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ test.each([
expect(io.which).toHaveBeenCalledWith(test.expected.python, true);
expect(exec.exec).toHaveBeenCalledWith(
expect.anything(),
expect.arrayContaining(["install", `cfn-lint==${test.expected.version}`])
expect.arrayContaining(["install", `cfn-lint==${test.expected.version}`]),
);
expect(core.addPath).toHaveBeenCalledTimes(1);
});
Expand Down

0 comments on commit 30eb5af

Please sign in to comment.