mirror of
https://github.com/all-contributors/cli.git
synced 2025-01-09 13:36:29 +00:00
fix: Make all contributors names bold (#55)
This commit is contained in:
parent
28eb16dea1
commit
07b3a684fc
2 changed files with 5 additions and 5 deletions
|
@ -4,7 +4,7 @@ var _ = require('lodash/fp');
|
|||
var formatContributionType = require('./format-contribution-type');
|
||||
|
||||
var avatarTemplate = _.template('<img src="<%= contributor.avatar_url %>" width="<%= options.imageSize %>px;"/>');
|
||||
var avatarBlockTemplate = _.template('[<%= avatar %><br /><sub><%= name %></sub>](<%= contributor.profile %>)');
|
||||
var avatarBlockTemplate = _.template('[<%= avatar %><br /><sub><b><%= name %></b></sub>](<%= contributor.profile %>)');
|
||||
var contributorTemplate = _.template('<%= avatarBlock %><br /><%= contributions %>');
|
||||
|
||||
var defaultImageSize = 100;
|
||||
|
|
|
@ -16,7 +16,7 @@ test('should format a simple contributor', t => {
|
|||
const contributor = _.assign(contributors.kentcdodds, {contributions: ['review']});
|
||||
const {options} = fixtures();
|
||||
|
||||
const expected = '[<img src="https://avatars1.githubusercontent.com/u/1500684" width="150px;"/><br /><sub>Kent C. Dodds</sub>](http://kentcdodds.com)<br />[👀](#review-kentcdodds "Reviewed Pull Requests")';
|
||||
const expected = '[<img src="https://avatars1.githubusercontent.com/u/1500684" width="150px;"/><br /><sub><b>Kent C. Dodds</b></sub>](http://kentcdodds.com)<br />[👀](#review-kentcdodds "Reviewed Pull Requests")';
|
||||
|
||||
t.is(formatContributor(options, contributor), expected);
|
||||
});
|
||||
|
@ -25,7 +25,7 @@ test('should format contributor with complex contribution types', t => {
|
|||
const contributor = contributors.kentcdodds;
|
||||
const {options} = fixtures();
|
||||
|
||||
const expected = '[<img src="https://avatars1.githubusercontent.com/u/1500684" width="150px;"/><br /><sub>Kent C. Dodds</sub>](http://kentcdodds.com)<br />[📖](https://github.com/jfmengels/all-contributors-cli/commits?author=kentcdodds "Documentation") [👀](#review-kentcdodds "Reviewed Pull Requests") [💬](#question-kentcdodds "Answering Questions")';
|
||||
const expected = '[<img src="https://avatars1.githubusercontent.com/u/1500684" width="150px;"/><br /><sub><b>Kent C. Dodds</b></sub>](http://kentcdodds.com)<br />[📖](https://github.com/jfmengels/all-contributors-cli/commits?author=kentcdodds "Documentation") [👀](#review-kentcdodds "Reviewed Pull Requests") [💬](#question-kentcdodds "Answering Questions")';
|
||||
|
||||
t.is(formatContributor(options, contributor), expected);
|
||||
});
|
||||
|
@ -45,7 +45,7 @@ test('should default image size to 100', t => {
|
|||
const {options} = fixtures();
|
||||
delete options.imageSize;
|
||||
|
||||
const expected = '[<img src="https://avatars1.githubusercontent.com/u/1500684" width="100px;"/><br /><sub>Kent C. Dodds</sub>](http://kentcdodds.com)<br />[👀](#review-kentcdodds "Reviewed Pull Requests")';
|
||||
const expected = '[<img src="https://avatars1.githubusercontent.com/u/1500684" width="100px;"/><br /><sub><b>Kent C. Dodds</b></sub>](http://kentcdodds.com)<br />[👀](#review-kentcdodds "Reviewed Pull Requests")';
|
||||
|
||||
t.is(formatContributor(options, contributor), expected);
|
||||
});
|
||||
|
@ -54,7 +54,7 @@ test('should format contributor with pipes in their name', t => {
|
|||
const contributor = contributors.pipey;
|
||||
const {options} = fixtures();
|
||||
|
||||
const expected = '[<img src="https://avatars1.githubusercontent.com/u/1500684" width="150px;"/><br /><sub>Who | Needs | Pipes?</sub>](http://github.com/chrisinajar)<br />[📖](https://github.com/jfmengels/all-contributors-cli/commits?author=pipey "Documentation")';
|
||||
const expected = '[<img src="https://avatars1.githubusercontent.com/u/1500684" width="150px;"/><br /><sub><b>Who | Needs | Pipes?</b></sub>](http://github.com/chrisinajar)<br />[📖](https://github.com/jfmengels/all-contributors-cli/commits?author=pipey "Documentation")';
|
||||
|
||||
t.is(formatContributor(options, contributor), expected);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue