jest-canvas-mock 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -2
- package/README.md +1 -1
- package/lib/classes/CanvasRenderingContext2D.js +3 -1
- package/lib/index.js +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
- Switched to `moo-color` for color parsing
|
|
9
9
|
- Added contributors to markdown document
|
|
10
10
|
- New Contributor [@evanoc0](https://github.com/evanoc0)
|
|
11
|
-
- New Contributor [@FeliciousX](https://github.com/FeliciousX)
|
|
12
|
-
- Add 2 methods of DOMMatrix [#70](https://github.com/hustcc/jest-canvas-mock/pull/70)
|
|
13
11
|
|
|
14
12
|
## Version 2.2.0
|
|
15
13
|
|
package/README.md
CHANGED
|
@@ -178,7 +178,7 @@ canvas.toDataURL.mockReturnValueOnce(
|
|
|
178
178
|
- [@hustcc](https://github.com/hustcc)
|
|
179
179
|
- [@jtenner](https://github.com/jtenner)
|
|
180
180
|
- [@evanoc0](https://github.com/evanoc0)
|
|
181
|
-
- [@
|
|
181
|
+
- [@lekha](https://github.com/lekha)
|
|
182
182
|
|
|
183
183
|
## License
|
|
184
184
|
|
|
@@ -1087,6 +1087,8 @@ class CanvasRenderingContext2D {
|
|
|
1087
1087
|
|
|
1088
1088
|
this._transformStack.pop();
|
|
1089
1089
|
|
|
1090
|
+
this._clipStack.pop();
|
|
1091
|
+
|
|
1090
1092
|
this._directionStack.pop();
|
|
1091
1093
|
|
|
1092
1094
|
this._fillStyleStack.pop();
|
|
@@ -1256,7 +1258,7 @@ class CanvasRenderingContext2D {
|
|
|
1256
1258
|
|
|
1257
1259
|
result = this._lineDashStack[this._stackIndex] = result.length % 2 === 1 ? result.concat(result) : result;
|
|
1258
1260
|
const event = (0, _createCanvasEvent.default)('setLineDash', getTransformSlice(this), {
|
|
1259
|
-
|
|
1261
|
+
segments: result.slice()
|
|
1260
1262
|
});
|
|
1261
1263
|
|
|
1262
1264
|
this._events.push(event);
|
package/lib/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jest-canvas-mock",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "Mock a canvas in your jest tests.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"moo-color": "^1.0.2"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
+
"@antv/g2plot": "^2.3.11",
|
|
19
20
|
"@babel/cli": "^7.8.4",
|
|
20
21
|
"@babel/core": "^7.9.0",
|
|
21
22
|
"@babel/plugin-proposal-class-properties": "^7.8.3",
|