(path, env = process.env)
| 841 | }; |
| 842 | |
| 843 | const tryToPerformTestCommit = (path, env = process.env) => { |
| 844 | try { |
| 845 | execSync( |
| 846 | 'git add . && git commit --allow-empty -m "Test commit" && git commit --allow-empty -am "Change commit msg"', |
| 847 | { cwd: path, env: env, } |
| 848 | ); |
| 849 | return true; |
| 850 | } catch (e) { |
| 851 | return false; |
| 852 | } |
| 853 | }; |
| 854 | |
| 855 | const expectCommitToSucceed = (path) => { |
| 856 | expect(tryToPerformTestCommit(path)).toBe(true); |
no outgoing calls
no test coverage detected