forked from folke/devmoji
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 🐛 --lint shouldn't fail on merge commit message (fixes folke#50)
- Loading branch information
Showing
2 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { Cli } from "../src/cli" | ||
|
||
test("should ", async () => { | ||
const cli = await Cli.create(["", ""], true) | ||
const valid = `style: 🎨 prettier 2.0 | ||
Merge branch 'master' of github.com:folke/devmoji | ||
style: 🎨 Prettier 2.0 | ||
chore(release): 2.1.8 [skip ci] | ||
fix(deps): update dependency chalk to v4 (#49) | ||
chore(deps): update all non-major dependencies (#48) | ||
chore(release): 2.1.7 [skip ci] | ||
fix: 🐛 🔒️ upgrade minimist which had a security vulnerability | ||
chore(deps): update all non-major dependencies (#47) | ||
chore(deps): update dependency prettier to v2 (#46) | ||
chore(deps): update all non-major dependencies (#45) | ||
chore(deps): update dependency rollup to v2.1.0 (#44) | ||
chore(deps): update all non-major dependencies to v2.24.0 (#43) | ||
chore(release): 2.1.6 [skip ci] | ||
fix: 🐛 new rollup version and commanderjs | ||
chore(deps): update all non-major dependencies (#37) | ||
chore(deps): update all non-major dependencies (#34) | ||
chore(release): 2.1.5 [skip ci] | ||
docs: fixed config example | ||
chore(deps): update dependency rollup to v2 (#35)` | ||
.split("\n") | ||
.map((s) => s.trim()) | ||
for (const msg of valid) { | ||
expect(cli.lint(msg)).toHaveLength(0) | ||
} | ||
|
||
const invalid = `Style: 🎨 prettier 2.0 | ||
Merging branch 'master' of github.com:folke/devmoji | ||
style 🎨 Prettier 2.0 | ||
chorerelease): 2.1.8 [skip ci] | ||
fix(deps) update dependency chalk to v4 (#49) | ||
chore(depS): update all non-major dependencies (#48) | ||
2.1.7 [skip ci] | ||
🔒️ upgrade minimist which had a security vulnerability | ||
update all non-major dependencies (#47)` | ||
.split("\n") | ||
.map((s) => s.trim()) | ||
for (const msg of invalid) { | ||
expect(cli.lint(msg)).not.toHaveLength(0) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters