+
+
+ "
+ `)
+ })
+ })
+
+ describe('nuxt-client', () => {
+ it('test transform with vite', async () => {
+ const result = await viteTransform(`
+
+
+
+
+
+
+
+
+
+ `, 'hello.server.vue')
+
+ expect(normalizeLineEndings(result)).toMatchInlineSnapshot(`
+ "
+
+
+
+
+
+
+
+
+
+ "
+ `)
+ })
+
+ it('test transform with webpack', async () => {
+ const spyOnWarn = vi.spyOn(console, 'warn')
+ const result = await webpackTransform(`
+
+
+
+
+
+
+
+
+
+
+ `, 'hello.server.vue')
+ expect(normalizeLineEndings(result)).toMatchInlineSnapshot(`
+ "
+
+
+
+
+
+
+
+
+
+
+ "
+ `)
+
+ expect(spyOnWarn).toHaveBeenCalledWith('nuxt-client attribute and client components within islands is only supported in vite mode. file: hello.server.vue')
+ })
+ })
+})