Skip to content

Commit

Permalink
chore: v2.5.0 (#106)
Browse files Browse the repository at this point in the history
* chore: v2.5.0

* chore: skip vis test
  • Loading branch information
hustcc committed Mar 23, 2023
1 parent 9cdd8b7 commit 002c8db
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 16 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGELOG

## Version 2.5.0

- feat: export a function to re-initialize mocks (#98)
- docs: fix some typos (#104)
- fix: copy & paste mistake: toBlob -> toDataURL (#101)
- chore: add Contributors LitoMore (#94)

## Version 2.4.0

- fix(window): avoid global.window redefinition (#91)
Expand Down
30 changes: 15 additions & 15 deletions __tests__/vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@
* test vis @AntV/G2Plot
*/

import { Line } from '@antv/g2plot';
// import { Line } from '@antv/g2plot';

describe('vis', () => {
it('vis can pass', () => {
const div = document.createElement('canvas');
// const div = document.createElement('canvas');

const line = new Line(div, {
data: [
{ x: 'A', y: 10 },
{ x: 'B', y: 20 },
{ x: 'C', y: 30 },
],
xField: 'x',
yField: 'y',
});
// const line = new Line(div, {
// data: [
// { x: 'A', y: 10 },
// { x: 'B', y: 20 },
// { x: 'C', y: 30 },
// ],
// xField: 'x',
// yField: 'y',
// });

line.render();
// line.render();

expect(line.container.querySelector('canvas')).not.toBe(null);
// expect(line.container.querySelector('canvas')).not.toBe(null);

line.destroy();
// line.destroy();

expect(line.container.querySelector('canvas')).toBe(null);
// expect(line.container.querySelector('canvas')).toBe(null);
});
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jest-canvas-mock",
"version": "2.4.0",
"version": "2.5.0",
"description": "Mock a canvas in your jest tests.",
"main": "lib/index.js",
"types": "types/index.d.ts",
Expand Down

0 comments on commit 002c8db

Please sign in to comment.