-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #120 from rkotze/migrate-mob-print
Migrate mob print to TypeScript and use Git Mob Core
- Loading branch information
Showing
9 changed files
with
60 additions
and
70 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
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
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
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
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
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
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 test from 'ava'; | ||
import { | ||
addAuthor, | ||
addCoAuthor, | ||
removeCoAuthors, | ||
safelyRemoveGitConfigSection, | ||
deleteGitMessageFile, | ||
exec, | ||
setCoauthorsFile, | ||
deleteCoauthorsFile, | ||
setup, | ||
tearDown, | ||
unsetCommitTemplate, | ||
} from '../test-helpers/index.js'; | ||
|
||
const { before, after, afterEach } = test; | ||
|
||
before('setup', () => { | ||
setup(); | ||
setCoauthorsFile(); | ||
}); | ||
|
||
after.always('final cleanup', () => { | ||
deleteCoauthorsFile(); | ||
deleteGitMessageFile(); | ||
tearDown(); | ||
}); | ||
|
||
afterEach.always('each cleanup', () => { | ||
safelyRemoveGitConfigSection('user'); | ||
safelyRemoveGitConfigSection('git-mob'); | ||
safelyRemoveGitConfigSection('commit'); | ||
}); | ||
|
||
test('Print a list of selected author keys', t => { | ||
addAuthor('John Doe', 'jdoe@example.com'); | ||
addCoAuthor('Jane Doe', 'jane@findmypast.com'); | ||
addCoAuthor('Elliot Alderson', 'ealderson@findmypast.com>'); | ||
const { stdout } = exec('git mob-print -i'); | ||
|
||
t.regex(stdout, /jd,ea/); | ||
|
||
unsetCommitTemplate(); | ||
removeCoAuthors(); | ||
}); |
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
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