From 804f1fa839ff3e65dbcc7aad2cf05427f5eeb372 Mon Sep 17 00:00:00 2001 From: neverland Date: Sun, 27 Aug 2023 16:34:09 +0800 Subject: [PATCH] test: fix canvas mock (#12226) --- packages/vant/src/image/test/index.spec.ts | 1 + .../test/__snapshots__/demo.spec.ts.snap | 28 +++++++++++++------ .../{demo-ssr.skip.ts => demo-ssr.spec.ts} | 0 .../test/{demo.skip.ts => demo.spec.ts} | 1 + .../test/{index.skip.ts => index.spec.ts} | 1 + .../test/{ssr.skip.ts => ssr.spec.ts} | 0 packages/vant/test/vitest.setup.ts | 1 - 7 files changed, 23 insertions(+), 9 deletions(-) rename packages/vant/src/signature/test/{demo-ssr.skip.ts => demo-ssr.spec.ts} (100%) rename packages/vant/src/signature/test/{demo.skip.ts => demo.spec.ts} (79%) rename packages/vant/src/signature/test/{index.skip.ts => index.spec.ts} (98%) rename packages/vant/src/signature/test/{ssr.skip.ts => ssr.spec.ts} (100%) delete mode 100644 packages/vant/test/vitest.setup.ts diff --git a/packages/vant/src/image/test/index.spec.ts b/packages/vant/src/image/test/index.spec.ts index 7d87c5bc7..2945be63c 100644 --- a/packages/vant/src/image/test/index.spec.ts +++ b/packages/vant/src/image/test/index.spec.ts @@ -1,3 +1,4 @@ +import 'vitest-canvas-mock'; import { mount } from '../../../test'; import { Lazyload } from '../../lazyload'; import VanImage from '..'; diff --git a/packages/vant/src/signature/test/__snapshots__/demo.spec.ts.snap b/packages/vant/src/signature/test/__snapshots__/demo.spec.ts.snap index c71d64425..04af06e2a 100644 --- a/packages/vant/src/signature/test/__snapshots__/demo.spec.ts.snap +++ b/packages/vant/src/signature/test/__snapshots__/demo.spec.ts.snap @@ -4,8 +4,11 @@ exports[`should render demo and match snapshot 1`] = `
-

-

+ +