test: update testing snapshot

This commit is contained in:
chenshenhai 2021-11-19 21:55:57 +08:00
parent edaf29b144
commit 34d6f246d1
4 changed files with 108 additions and 17 deletions

View file

@ -564,6 +564,23 @@ Array [
],
"type": "clearRect",
},
Object {
"props": Object {
"height": 1600,
"width": 2400,
"x": 0,
"y": 0,
},
"transform": Array [
1,
0,
0,
1,
0,
0,
],
"type": "clearRect",
},
Object {
"props": Object {
"dHeight": 1600,

View file

@ -564,6 +564,23 @@ Array [
],
"type": "clearRect",
},
Object {
"props": Object {
"height": 1600,
"width": 2400,
"x": 0,
"y": 0,
},
"transform": Array [
1,
0,
0,
1,
0,
0,
],
"type": "clearRect",
},
Object {
"props": Object {
"dHeight": 1600,
@ -1181,6 +1198,23 @@ Array [
],
"type": "clearRect",
},
Object {
"props": Object {
"height": 1600,
"width": 2400,
"x": 0,
"y": 0,
},
"transform": Array [
1,
0,
0,
1,
0,
0,
],
"type": "clearRect",
},
Object {
"props": Object {
"dHeight": 1600,

View file

@ -4,13 +4,13 @@ import '../../../__tests__/polyfill/image';
import IDraw from '../src';
import { getData } from './data';
function delay(time: number): Promise<void> {
return new Promise((resolve) => {
setTimeout(() => {
resolve();
}, time)
});
}
// function delay(time: number): Promise<void> {
// return new Promise((resolve) => {
// setTimeout(() => {
// resolve();
// }, time)
// });
// }
describe("@idraw/core", () => {

View file

@ -564,6 +564,23 @@ Array [
],
"type": "clearRect",
},
Object {
"props": Object {
"height": 1600,
"width": 2400,
"x": 0,
"y": 0,
},
"transform": Array [
1,
0,
0,
1,
0,
0,
],
"type": "clearRect",
},
Object {
"props": Object {
"dHeight": 1600,
@ -591,13 +608,16 @@ Array [
},
Object {
"props": Object {
"dHeight": 150,
"dWidth": 300,
"dHeight": 1600,
"dWidth": 2400,
"dx": 0,
"dy": 0,
"img": <canvas />,
"sHeight": 150,
"sWidth": 300,
"img": <canvas
height="1600"
width="2400"
/>,
"sHeight": 1600,
"sWidth": 2400,
"sx": 0,
"sy": 0,
},
@ -1178,6 +1198,23 @@ Array [
],
"type": "clearRect",
},
Object {
"props": Object {
"height": 1600,
"width": 2400,
"x": 0,
"y": 0,
},
"transform": Array [
1,
0,
0,
1,
0,
0,
],
"type": "clearRect",
},
Object {
"props": Object {
"dHeight": 1600,
@ -1205,13 +1242,16 @@ Array [
},
Object {
"props": Object {
"dHeight": 150,
"dWidth": 300,
"dHeight": 1600,
"dWidth": 2400,
"dx": 0,
"dy": 0,
"img": <canvas />,
"sHeight": 150,
"sWidth": 300,
"img": <canvas
height="1600"
width="2400"
/>,
"sHeight": 1600,
"sWidth": 2400,
"sx": 0,
"sy": 0,
},