test: fix canvas mock (#12226)

This commit is contained in:
neverland
2023-08-27 16:34:09 +08:00
committed by GitHub
parent 57dc768a02
commit 804f1fa839
7 changed files with 23 additions and 9 deletions
@@ -1,3 +1,4 @@
import 'vitest-canvas-mock';
import { mount } from '../../../test';
import { Lazyload } from '../../lazyload';
import VanImage from '..';
@@ -4,8 +4,11 @@ exports[`should render demo and match snapshot 1`] = `
<div>
<div class="van-signature">
<div class="van-signature__content">
<p>
</p>
<canvas
width="100"
height="100"
>
</canvas>
</div>
<div class="van-signature__footer">
<button
@@ -34,8 +37,11 @@ exports[`should render demo and match snapshot 1`] = `
<div>
<div class="van-signature">
<div class="van-signature__content">
<p>
</p>
<canvas
width="100"
height="100"
>
</canvas>
</div>
<div class="van-signature__footer">
<button
@@ -64,8 +70,11 @@ exports[`should render demo and match snapshot 1`] = `
<div>
<div class="van-signature">
<div class="van-signature__content">
<p>
</p>
<canvas
width="100"
height="100"
>
</canvas>
</div>
<div class="van-signature__footer">
<button
@@ -94,8 +103,11 @@ exports[`should render demo and match snapshot 1`] = `
<div>
<div class="van-signature">
<div class="van-signature__content">
<p>
</p>
<canvas
width="100"
height="100"
>
</canvas>
</div>
<div class="van-signature__footer">
<button
@@ -1,3 +1,4 @@
import 'vitest-canvas-mock';
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
@@ -1,3 +1,4 @@
import 'vitest-canvas-mock';
import { Signature } from '..';
import { mount } from '../../../test';
-1
View File
@@ -1 +0,0 @@
import 'vitest-canvas-mock';