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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 23 additions and 9 deletions

View File

@ -1,3 +1,4 @@
import 'vitest-canvas-mock';
import { mount } from '../../../test'; import { mount } from '../../../test';
import { Lazyload } from '../../lazyload'; import { Lazyload } from '../../lazyload';
import VanImage from '..'; import VanImage from '..';

View File

@ -4,8 +4,11 @@ exports[`should render demo and match snapshot 1`] = `
<div> <div>
<div class="van-signature"> <div class="van-signature">
<div class="van-signature__content"> <div class="van-signature__content">
<p> <canvas
</p> width="100"
height="100"
>
</canvas>
</div> </div>
<div class="van-signature__footer"> <div class="van-signature__footer">
<button <button
@ -34,8 +37,11 @@ exports[`should render demo and match snapshot 1`] = `
<div> <div>
<div class="van-signature"> <div class="van-signature">
<div class="van-signature__content"> <div class="van-signature__content">
<p> <canvas
</p> width="100"
height="100"
>
</canvas>
</div> </div>
<div class="van-signature__footer"> <div class="van-signature__footer">
<button <button
@ -64,8 +70,11 @@ exports[`should render demo and match snapshot 1`] = `
<div> <div>
<div class="van-signature"> <div class="van-signature">
<div class="van-signature__content"> <div class="van-signature__content">
<p> <canvas
</p> width="100"
height="100"
>
</canvas>
</div> </div>
<div class="van-signature__footer"> <div class="van-signature__footer">
<button <button
@ -94,8 +103,11 @@ exports[`should render demo and match snapshot 1`] = `
<div> <div>
<div class="van-signature"> <div class="van-signature">
<div class="van-signature__content"> <div class="van-signature__content">
<p> <canvas
</p> width="100"
height="100"
>
</canvas>
</div> </div>
<div class="van-signature__footer"> <div class="van-signature__footer">
<button <button

View File

@ -1,3 +1,4 @@
import 'vitest-canvas-mock';
import Demo from '../demo/index.vue'; import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo'; import { snapshotDemo } from '../../../test/demo';

View File

@ -1,3 +1,4 @@
import 'vitest-canvas-mock';
import { Signature } from '..'; import { Signature } from '..';
import { mount } from '../../../test'; import { mount } from '../../../test';

View File

@ -1 +0,0 @@
import 'vitest-canvas-mock';