MCPcopy Create free account
hub / github.com/toplenboren/simple-git-hooks / tryToPerformTestCommit

Function tryToPerformTestCommit

simple-git-hooks.test.js:663–673  ·  view source on GitHub ↗
(path, env = process.env)

Source from the content-addressed store, hash-verified

661 };
662
663 const tryToPerformTestCommit = (path, env = process.env) => {
664 try {
665 execSync(
666 'git add . && git commit --allow-empty -m "Test commit" && git commit --allow-empty -am "Change commit msg"',
667 { cwd: path, env: env, }
668 );
669 return true;
670 } catch (e) {
671 return false;
672 }
673 };
674
675 const expectCommitToSucceed = (path) => {
676 expect(tryToPerformTestCommit(path)).toBe(true);

Callers 2

expectCommitToSucceedFunction · 0.85
expectCommitToFailFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…