Skip to content

Commit

Permalink
Correct test
Browse files Browse the repository at this point in the history
  • Loading branch information
louckousse committed Oct 5, 2019
1 parent 5627350 commit 797aa4b
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/questions/author-github.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { cleanSocialNetworkUsername } = require('../utils')

module.exports = projectInfos => ({
type: 'input',
message: '👤 GitHub username (use comma if several, use empty value to skip)',
message: '👤 GitHub username (comma to split, empty to skip)',
name: 'authorGithubUsername',
default: projectInfos.githubUsername,
filter: cleanSocialNetworkUsername
Expand Down
2 changes: 1 addition & 1 deletion src/questions/author-github.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('askAuthorGithub', () => {

expect(result).toEqual({
type: 'input',
message: '👤 GitHub username (use empty value to skip)',
message: '👤 GitHub username (comma to split, empty to skip)',
name: 'authorGithubUsername',
default: githubUsername,
filter: expect.any(Function)
Expand Down
2 changes: 1 addition & 1 deletion src/questions/author-name.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('askAuthorName', () => {

expect(result).toEqual({
type: 'input',
message: '👤 Author name',
message: '👤 Author name (use comma if several)',
name: 'authorName',
default: author
})
Expand Down
2 changes: 1 addition & 1 deletion src/questions/author-twitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { cleanSocialNetworkUsername } = require('../utils')

module.exports = () => ({
type: 'input',
message: '🐦 Twitter username (use comma if several, use empty value to skip)',
message: '🐦 Twitter username (comma to split, empty to skip)',
name: 'authorTwitterUsername',
filter: cleanSocialNetworkUsername
})
2 changes: 1 addition & 1 deletion src/questions/author-twitter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('askAuthorTwitter', () => {

expect(result).toEqual({
type: 'input',
message: '🐦 Twitter username (use empty value to skip)',
message: '🐦 Twitter username (comma to split, empty to skip)',
name: 'authorTwitterUsername',
filter: expect.any(Function)
})
Expand Down
8 changes: 5 additions & 3 deletions templates/default-no-html.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,17 @@
<% if (authorName.split(',').length > 1) { -%>

## Authors

<% } else { -%>

## Author
<% } -%>

<% } -%>
<% const names = authorName.split(',') -%>
<% const twitters = authorTwitterUsername.split(',') -%>
<% const githubs = authorGithubUsername.split(',') -%>
<% for (var i = 0; i < names.length; i++) { -%>

<% if (names[i]) { %>
<% if (names[i]) { -%>
👤 **<%= names[i].trim() %>**
<% } %>
<% if (twitters[i]) { -%>
Expand Down Expand Up @@ -118,6 +119,7 @@ Give a ⭐️ if this project helped you!
<% const githubs = authorGithubUsername.split(',') -%>
Copyright © <%= currentYear %> [<%= authors[0].trim() %>](https://github.com/<%= githubs[0].trim() %>)<% for (var i = 1; i < authors.length; i++) { if (authors[i] && githubs[i]) { -%>, [<%= authors[i].trim() %>](https://github.com/<%= githubs[i].trim() %>)<%_ }} _%>.
<% } -%>

This project is [<%= licenseName %>](<%= licenseUrl %>) licensed.
<% } -%>

Expand Down
3 changes: 1 addition & 2 deletions templates/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,13 @@

## Authors
<% } else { -%>

## Author
<% } -%>

<% const names = authorName.split(',') -%>
<% const twitters = authorTwitterUsername.split(',') -%>
<% const githubs = authorGithubUsername.split(',') -%>
<% for (var i = 0; i < names.length; i++) { -%>

<% if (names[i]) { %>
👤 **<%= names[i].trim() %>**
<% } %>
Expand Down

0 comments on commit 797aa4b

Please sign in to comment.