Skip to content

Commit 52c7b66

Browse files
committed
Receiving snake color as parameter
1 parent 4b143b6 commit 52c7b66

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

packages/action/__tests__/dev.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { generateContributionSnake } from "../generateContributionSnake";
66
const outputSvg = path.join(__dirname, "__snapshots__/out.svg");
77
const outputGif = path.join(__dirname, "__snapshots__/out.gif");
88

9-
const buffer = await generateContributionSnake("platane", {
9+
const buffer = await generateContributionSnake("platane", "#ffd900", {
1010
svg: true,
1111
gif: true,
1212
});

packages/action/__tests__/generateContributionSnake.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ it(
2121
const outputGif = path.join(__dirname, "__snapshots__/out.gif");
2222

2323
console.log = () => undefined;
24-
const buffer = await generateContributionSnake("platane", {
24+
const buffer = await generateContributionSnake("platane", "#ffd900", {
2525
svg: true,
2626
gif: true,
2727
});

packages/action/generateContributionSnake.ts

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ export const generateContributionSnake = async (
1717
const grid = userContributionToGrid(cells, colorScheme);
1818
const snake = snake4;
1919

20+
console.log('>>> The snake will be', snakeColor);
21+
2022
const drawOptions = {
2123
sizeBorderRadius: 2,
2224
sizeCell: 16,

0 commit comments

Comments
 (0)