github-pages-deploy-action/__tests__/execute.test.ts
James Ives d17161afee
[Issue-133] Customizable Commit Messages (#134)
* Customizable Commit Messages

* Removes lodash

* Update package.json

* README

* Changes

* Check for null

* Adds a dash
2020-01-18 14:41:49 -05:00

20 lines
434 B
TypeScript

import { execute } from "../src/execute";
import { exec } from "@actions/exec";
jest.mock("@actions/exec", () => ({
exec: jest.fn()
}));
describe("execute", () => {
it("should be called with the correct arguments", async () => {
await execute("echo Montezuma", "./");
expect(exec).toBeCalledWith("echo Montezuma", [], {
cwd: "./",
listeners: {
stdout: expect.any(Function)
}
});
});
});