github-pages-deploy-action/__tests__/util.test.ts
2019-11-07 19:57:58 -05:00

23 lines
502 B
TypeScript

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