From 0fbb877aae228a93fac6cf11746ad4ffca80516c Mon Sep 17 00:00:00 2001 From: Pierre-Denis Vanduynslager Date: Tue, 19 Sep 2017 20:39:31 -0400 Subject: [PATCH] test: Test malformatted commit messages --- test/integration.test.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/integration.test.js b/test/integration.test.js index 02cf8f43..a6931c04 100644 --- a/test/integration.test.js +++ b/test/integration.test.js @@ -127,6 +127,13 @@ test('Use default "releaseRules" if none of provided match', async t => { t.is(releaseType, 'minor'); }); +test('Ignore malformatted commits and process valid ones', async t => { + const commits = [{message: 'fix(scope1): First fix'}, {message: 'Feature => Invalid message'}]; + const releaseType = await pify(commitAnalyzer)({}, {commits}); + + t.is(releaseType, 'patch'); +}); + test('Throw "SemanticReleaseError" if "preset" doesn`t exist', async t => { const error = await t.throws( pify(commitAnalyzer)({preset: 'unknown-preset'}, {}),