Skip to content

Commit cd96b30

Browse files
committed
test: Test malformatted commit messages
1 parent 0630747 commit cd96b30

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/integration.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@ test('Use default "releaseRules" if none of provided match', async t => {
127127
t.is(releaseType, 'minor');
128128
});
129129

130+
test('Ignore malformatted commits and process valid ones', async t => {
131+
const commits = [{message: 'fix(scope1): First fix'}, {message: 'Feature => Invalid message'}];
132+
const releaseType = await pify(commitAnalyzer)({}, {commits});
133+
134+
t.is(releaseType, 'patch');
135+
});
136+
130137
test('Throw "SemanticReleaseError" if "preset" doesn`t exist', async t => {
131138
const error = await t.throws(
132139
pify(commitAnalyzer)({preset: 'unknown-preset'}, {}),

0 commit comments

Comments
 (0)