From 0ebae951efca2f260c0efc2198b7ec5e559fcd5c Mon Sep 17 00:00:00 2001 From: "qing.deng" Date: Thu, 28 Jul 2022 12:43:37 +0800 Subject: [PATCH] test: update --- .../node/__tests__/plugins/dynamicImportVar/parse.test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/vite/src/node/__tests__/plugins/dynamicImportVar/parse.test.ts b/packages/vite/src/node/__tests__/plugins/dynamicImportVar/parse.test.ts index b9fbea192ac262..93133e636f447c 100644 --- a/packages/vite/src/node/__tests__/plugins/dynamicImportVar/parse.test.ts +++ b/packages/vite/src/node/__tests__/plugins/dynamicImportVar/parse.test.ts @@ -42,12 +42,16 @@ describe('parse positives', () => { }) it('with ../ and itself', async () => { - expect(await run('`../dynamicImportVar/${name}.js`')).toMatchSnapshot() + expect(await run('`../dynamicImportVar/${name}.js`')).toMatchInlineSnapshot( + '"__variableDynamicImportRuntimeHelper((import.meta.glob(\\"../dynamicImportVar/*.js\\")), `./${name}.js`)"' + ) }) it('with multi ../ and itself', async () => { expect( await run('`../../plugins/dynamicImportVar/${name}.js`') - ).toMatchSnapshot() + ).toMatchInlineSnapshot( + '"__variableDynamicImportRuntimeHelper((import.meta.glob(\\"../../plugins/dynamicImportVar/*.js\\")), `./${name}.js`)"' + ) }) })