1
0
mirror of synced 2026-03-25 06:51:23 +00:00

fix(CLI): use placeholders for email, name, and GitHub username

This commit is contained in:
Jason Dreyzehner
2018-03-10 15:17:40 -05:00
parent 41ac31532f
commit abef54a412
2 changed files with 20 additions and 15 deletions

View File

@@ -10,7 +10,8 @@ import {
getGithubUsername,
getUserInfo,
initialCommit,
install
install,
Placeholders
} from '../tasks';
test('errors if outdated', async t => {
@@ -107,14 +108,14 @@ test('getGithubUsername: returns placeholder if not found', async t => {
const username: string = await getGithubUsername(mockFetcher)(
'bitjson@github.com'
);
t.is(username, 'YOUR_USER_NAME');
t.is(username, Placeholders.username);
});
test('getUserInfo: suppresses errors and returns undefined', async t => {
test('getUserInfo: suppresses errors and returns empty strings', async t => {
const result = await getUserInfo(mockErr(1))();
t.deepEqual(result, {
gitEmail: undefined,
gitName: undefined
gitEmail: Placeholders.email,
gitName: Placeholders.name
});
});