Skip to content

Commit 4860e97

Browse files
committed
Test degenerate case of checkoutSide()
1 parent 8bf9385 commit 4860e97

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/git-strategies.test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,6 +1302,17 @@ import * as reporterProxy from '../lib/reporter-proxy';
13021302
});
13031303
});
13041304

1305+
describe('checkoutSide', function() {
1306+
it('is a no-op when no paths are provided', async function() {
1307+
const workdir = await cloneRepository();
1308+
const git = await createTestStrategy(workdir);
1309+
sinon.spy(git, 'exec');
1310+
1311+
await git.checkoutSide('ours', []);
1312+
assert.isFalse(git.exec.called);
1313+
});
1314+
});
1315+
13051316
// Only needs to be tested on strategies that actually implement gpgExec
13061317
describe('GPG signing', function() {
13071318
let git;

0 commit comments

Comments
 (0)