From b34ada67d109b1e12326d9386609176be607b703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=89=E9=9E=8B=E6=B2=A1=E5=8F=B7?= <308487730@qq.com> Date: Thu, 27 Apr 2023 16:47:52 +0800 Subject: [PATCH] test: v1.3.0 --- test/fixtures/__snapshots__/main.js | 4 ++-- test/serve.test.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/fixtures/__snapshots__/main.js b/test/fixtures/__snapshots__/main.js index c7ff0f8..6c5af54 100644 --- a/test/fixtures/__snapshots__/main.js +++ b/test/fixtures/__snapshots__/main.js @@ -66,7 +66,7 @@ }); } })(); -// ---- dynamic import runtime functions --S-- +// [vite-plugin-dynamic-import] runtime -S- function __variableDynamicImportRuntime0__(path) { switch (path) { case '@/views/foo': @@ -198,4 +198,4 @@ function __variableDynamicImportRuntime5__(path) { }) } } -// ---- dynamic import runtime functions --E-- \ No newline at end of file +// [vite-plugin-dynamic-import] runtime -E- \ No newline at end of file diff --git a/test/serve.test.ts b/test/serve.test.ts index b2012cd..d694f4f 100644 --- a/test/serve.test.ts +++ b/test/serve.test.ts @@ -26,8 +26,8 @@ beforeAll(async () => { describe('vite serve', async () => { it('__snapshots__', async () => { const mainTs = await (await fetch(`http://localhost:${PORT}/src/main.ts`)).text() - const mainJs = fs.readFileSync(path.join(path.join(root, 'dist/main.js')), 'utf8') - const mainJsSnap = fs.readFileSync(path.join(path.join(root, '__snapshots__/main.js')), 'utf8') + const mainJs = fs.readFileSync(path.join(root, 'dist/main.js'), 'utf8') + const mainJsSnap = fs.readFileSync(path.join(root, '__snapshots__/main.js'), 'utf8') expect(mainTs).string expect(mainJs).eq(mainJsSnap)