@interaktiv/dia-scripts
Version:
CLI toolbox with common scripts for most sort of projects at DIA
21 lines (19 loc) • 451 B
JavaScript
;
let bootstrapMock;
describe('run commit', () => {
beforeEach(() => {
jest.mock('commitizen/dist/cli/git-cz', () => ({
bootstrap: jest.fn(() => {})
}));
({
bootstrap: bootstrapMock
} = require('commitizen/dist/cli/git-cz'));
});
afterEach(() => {
jest.resetModules();
});
test('should run commitizen CLI', () => {
require('./commit');
expect(bootstrapMock).toBeCalledTimes(1);
});
});