1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 1× 3× 3× 3× | import dedent from 'dedent'; import {commit as gitCommit, log} from '../git'; export default commit; /** * Asynchronously commits files using commitizen */ function commit(sh, inquirer, repoPath, prompter, options, done) { // Get user input -- side effect that is hard to test prompter(inquirer, function(template, overrideOptions) { // Commit the user input -- side effect that we'll test gitCommit(sh, repoPath, template, { ...options, ...overrideOptions }, function() { done(template); }); }); } |