From 61089cbcb791acf9dc596dcc903e7b9c6c76c0e1 Mon Sep 17 00:00:00 2001 From: Steve King Date: Wed, 1 Dec 2021 19:59:40 +0000 Subject: [PATCH] fix: Add example for empty commit message in `git.commit()` --- test/unit/commit.spec.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/unit/commit.spec.ts b/test/unit/commit.spec.ts index c4b1ac59..4d2ecd8d 100644 --- a/test/unit/commit.spec.ts +++ b/test/unit/commit.spec.ts @@ -21,6 +21,12 @@ describe('commit', () => { }); describe('usage', () => { + it('empty commit', async () => { + git.commit([], {'--amend': null, '--no-edit': null}); + await closeWithSuccess(); + assertExecutedCommands('commit', '--amend', '--no-edit'); + }); + it('single message, no files, no options and callback', async () => { const task = git.commit('message', callback); await closeWithSuccess();