Skip to content

Commit

Permalink
fix: add canvas polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
sgratzl committed Jan 17, 2021
1 parent 16824b9 commit 24cacf4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"@typescript-eslint/parser": "^4.13.0",
"@yarnpkg/pnpify": "^2.4.0",
"canvas": "^2.6.1",
"canvas-5-polyfill": "^0.1.5",
"chart.js": "^3.0.0-beta.9",
"eslint": "^7.18.0",
"eslint-config-prettier": "^7.1.0",
Expand Down
1 change: 1 addition & 0 deletions src/__tests__/createChart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import { Chart, ChartConfiguration, defaults, ChartType, DefaultDataPoint } from 'chart.js';
import { toMatchImageSnapshot, MatchImageSnapshotOptions } from 'jest-image-snapshot';
import 'canvas-5-polyfill';

expect.extend({ toMatchImageSnapshot });

Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,7 @@ __metadata:
"@typescript-eslint/parser": ^4.13.0
"@yarnpkg/pnpify": ^2.4.0
canvas: ^2.6.1
canvas-5-polyfill: ^0.1.5
chart.js: ^3.0.0-beta.9
eslint: ^7.18.0
eslint-config-prettier: ^7.1.0
Expand Down Expand Up @@ -2338,6 +2339,13 @@ __metadata:
languageName: node
linkType: hard

"canvas-5-polyfill@npm:^0.1.5":
version: 0.1.5
resolution: "canvas-5-polyfill@npm:0.1.5"
checksum: d9be86b8e363ea063a596c030fc97d7f2ac4b38ec34b0515c200e96e128c387758ef062b0ea9c46973701e1e230a69b4aa7d85d6bb2db010a975d8d5c1ab258b
languageName: node
linkType: hard

"canvas@npm:^2.6.1":
version: 2.6.1
resolution: "canvas@npm:2.6.1"
Expand Down

0 comments on commit 24cacf4

Please sign in to comment.