From b76c02080daf934d981b09c863a1805e94911d4e Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Thu, 16 Dec 2021 00:01:34 -0600 Subject: [PATCH] feat(badges): included the node.js logo in the badge generated to communicate the engines range --- src/enhancers/engines-test.js | 5 ++++- src/enhancers/engines.js | 2 +- test/integration/features/step_definitions/engines-steps.js | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/enhancers/engines-test.js b/src/enhancers/engines-test.js index 8b7c1eb..b26953f 100644 --- a/src/enhancers/engines-test.js +++ b/src/enhancers/engines-test.js @@ -44,6 +44,9 @@ suite('engines enhancer', () => { assert.equal(scripts['lint:engines'], 'ls-engines'); assert.deepEqual(devDependencies, ['ls-engines']); - assert.deepEqual(badges.consumer.node, {img: `https://img.shields.io/node/v/${projectName}.svg`, text: 'node'}); + assert.deepEqual( + badges.consumer.node, + {img: `https://img.shields.io/node/v/${projectName}?logo=node.js`, text: 'node'} + ); }); }); diff --git a/src/enhancers/engines.js b/src/enhancers/engines.js index c48b1ad..05ead07 100644 --- a/src/enhancers/engines.js +++ b/src/enhancers/engines.js @@ -12,6 +12,6 @@ export async function lift({projectRoot}) { return { devDependencies: ['ls-engines'], scripts: {'lint:engines': 'ls-engines'}, - badges: {consumer: {node: {img: `https://img.shields.io/node/v/${name}.svg`, text: 'node'}}} + badges: {consumer: {node: {img: `https://img.shields.io/node/v/${name}?logo=node.js`, text: 'node'}}} }; } diff --git a/test/integration/features/step_definitions/engines-steps.js b/test/integration/features/step_definitions/engines-steps.js index a156cf0..a053bf4 100644 --- a/test/integration/features/step_definitions/engines-steps.js +++ b/test/integration/features/step_definitions/engines-steps.js @@ -12,7 +12,7 @@ Then('the engines badge is added to the consumer group', async function () { assert.deepEqual( badges.consumer.node, { - img: `https://img.shields.io/node/v/${this.projectName}.svg`, + img: `https://img.shields.io/node/v/${this.projectName}?logo=node.js`, text: 'node' } );