diff options
author | 2023-03-31 17:44:00 +0000 | |
---|---|---|
committer | 2023-03-31 17:44:00 +0000 | |
commit | 7f8ccbe876500a19280016d6d378d0c547d13119 (patch) | |
tree | 7774194c1e5a064aadb900c829cd6d32e63dda25 | |
parent | d59e511d16482cfc7067555dd0a456098ec69e30 (diff) | |
download | astro-7f8ccbe876500a19280016d6d378d0c547d13119.tar.gz astro-7f8ccbe876500a19280016d6d378d0c547d13119.tar.zst astro-7f8ccbe876500a19280016d6d378d0c547d13119.zip |
[ci] format
-rw-r--r-- | packages/astro/e2e/vue-component.test.js | 7 | ||||
-rw-r--r-- | packages/integrations/vue/client.js | 8 |
2 files changed, 7 insertions, 8 deletions
diff --git a/packages/astro/e2e/vue-component.test.js b/packages/astro/e2e/vue-component.test.js index 42f0d80ef..b7371cd1b 100644 --- a/packages/astro/e2e/vue-component.test.js +++ b/packages/astro/e2e/vue-component.test.js @@ -24,13 +24,12 @@ test.describe('Vue components in MDX files', () => { }); }); - test('test the async vue component in astro', async ({ page, astro }) => { - await page.goto(astro.resolveUrl('/')); + await page.goto(astro.resolveUrl('/')); - const label = page.locator('#client-test'); + const label = page.locator('#client-test'); - await expect(label, 'component not hydrated').toHaveText('2'); + await expect(label, 'component not hydrated').toHaveText('2'); }); test('test the async vue component in mdx', async ({ page, astro }) => { diff --git a/packages/integrations/vue/client.js b/packages/integrations/vue/client.js index 508cc59c0..ca61116b2 100644 --- a/packages/integrations/vue/client.js +++ b/packages/integrations/vue/client.js @@ -18,9 +18,9 @@ export default (element) => // related to https://github.com/withastro/astro/issues/6549 // if the component is async, wrap it in a Suspense component if (isAsync(Component.setup)) { - content = h(Suspense, null, content) + content = h(Suspense, null, content); } - + if (client === 'only') { const app = createApp({ name, render: () => content }); await setup(app); @@ -32,7 +32,7 @@ export default (element) => } }; -function isAsync (fn) { - const constructor = fn?.constructor +function isAsync(fn) { + const constructor = fn?.constructor; return constructor && constructor.name === 'AsyncFunction'; } |