From fc2d05e6b9c6c6a5360d9de9c521e341a96f0d4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kowalski?= Date: Sun, 28 Jun 2020 18:58:51 +0200 Subject: [PATCH] perf: add image size to avatar url to improve performance (#269) Co-authored-by: Maximilian Berkmann --- src/generate/__tests__/format-contributor.js | 11 +++++------ src/generate/format-contributor.js | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/generate/__tests__/format-contributor.js b/src/generate/__tests__/format-contributor.js index a2fc80e..013318a 100644 --- a/src/generate/__tests__/format-contributor.js +++ b/src/generate/__tests__/format-contributor.js @@ -20,7 +20,7 @@ test('format a simple contributor', () => { const {options} = fixtures() const expected = - '
Kent C. Dodds

👀' + '
Kent C. Dodds

👀' expect(formatContributor(options, contributor)).toBe(expected) }) @@ -30,7 +30,7 @@ test('format contributor with complex contribution types', () => { const {options} = fixtures() const expected = - '
Kent C. Dodds

📖 👀 💬' + '
Kent C. Dodds

📖 👀 💬' expect(formatContributor(options, contributor)).toBe(expected) }) @@ -53,8 +53,7 @@ test('default image size to 100', () => { delete options.imageSize const expected = - '
Kent C. Dodds

👀' - + '
Kent C. Dodds

👀' expect(formatContributor(options, contributor)).toBe(expected) }) @@ -64,7 +63,7 @@ test('format contributor with pipes in their name', () => { const {options} = fixtures() const expected = - '
Who | Needs | Pipes?

📖' + '
Who | Needs | Pipes?

📖' expect(formatContributor(options, contributor)).toBe(expected) }) @@ -74,7 +73,7 @@ test('format contributor with no github account', () => { const {options} = fixtures() const expected = - '
No Github Account
🌍' + '
No Github Account
🌍' expect(formatContributor(options, contributor)).toBe(expected) }) diff --git a/src/generate/format-contributor.js b/src/generate/format-contributor.js index 63716f2..048d63d 100644 --- a/src/generate/format-contributor.js +++ b/src/generate/format-contributor.js @@ -2,7 +2,7 @@ const _ = require('lodash/fp') const formatContributionType = require('./format-contribution-type') const avatarTemplate = _.template( - '', + '', ) const avatarBlockTemplate = _.template( '<%= avatar %>
<%= name %>
',