Skip to content

Commit 24cacf4

Browse files
committed
fix: add canvas polyfill
1 parent 16824b9 commit 24cacf4

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
"@typescript-eslint/parser": "^4.13.0",
7171
"@yarnpkg/pnpify": "^2.4.0",
7272
"canvas": "^2.6.1",
73+
"canvas-5-polyfill": "^0.1.5",
7374
"chart.js": "^3.0.0-beta.9",
7475
"eslint": "^7.18.0",
7576
"eslint-config-prettier": "^7.1.0",

src/__tests__/createChart.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

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

78
expect.extend({ toMatchImageSnapshot });
89

yarn.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -985,6 +985,7 @@ __metadata:
985985
"@typescript-eslint/parser": ^4.13.0
986986
"@yarnpkg/pnpify": ^2.4.0
987987
canvas: ^2.6.1
988+
canvas-5-polyfill: ^0.1.5
988989
chart.js: ^3.0.0-beta.9
989990
eslint: ^7.18.0
990991
eslint-config-prettier: ^7.1.0
@@ -2338,6 +2339,13 @@ __metadata:
23382339
languageName: node
23392340
linkType: hard
23402341

2342+
"canvas-5-polyfill@npm:^0.1.5":
2343+
version: 0.1.5
2344+
resolution: "canvas-5-polyfill@npm:0.1.5"
2345+
checksum: d9be86b8e363ea063a596c030fc97d7f2ac4b38ec34b0515c200e96e128c387758ef062b0ea9c46973701e1e230a69b4aa7d85d6bb2db010a975d8d5c1ab258b
2346+
languageName: node
2347+
linkType: hard
2348+
23412349
"canvas@npm:^2.6.1":
23422350
version: 2.6.1
23432351
resolution: "canvas@npm:2.6.1"

0 commit comments

Comments
 (0)