Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re authored and astrobot-houston committed Oct 13, 2022
1 parent d25f54c commit 4866ff8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/integrations/vue/client.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { h, createSSRApp, createApp } from 'vue';
import { setup } from 'virtual:@astrojs/vue/app'
import { setup } from 'virtual:@astrojs/vue/app';
import StaticHtml from './static-html.js';

export default (element) =>
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/vue/server.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { h, createSSRApp } from 'vue';
import { renderToString } from 'vue/server-renderer';
import { setup } from 'virtual:@astrojs/vue/app'
import { setup } from 'virtual:@astrojs/vue/app';
import StaticHtml from './static-html.js';

function check(Component) {
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/vue/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async function getViteConfiguration(options?: Options): Promise<UserConfig> {
const config: UserConfig = {
optimizeDeps: {
include: ['@astrojs/vue/client.js', 'vue'],
exclude: ['@astrojs/vue/server.js', 'virtual:@astrojs/vue/app']
exclude: ['@astrojs/vue/server.js', 'virtual:@astrojs/vue/app'],
},
plugins: [vue(options), virtualAppEntrypoint(options)],
ssr: {
Expand Down
8 changes: 4 additions & 4 deletions packages/integrations/vue/test/app-entrypoint.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ describe('App Entrypoint', () => {

before(async () => {
fixture = await loadFixture({
root: './fixtures/app-entrypoint/'
root: './fixtures/app-entrypoint/',
});
await fixture.build();
});

it('loads during SSR', async () => {
const data = await fixture.readFile('/index.html')
const data = await fixture.readFile('/index.html');
const { document } = parseHTML(data);
const bar = document.querySelector('#foo > #bar');
expect(bar).not.to.be.undefined;
expect(bar.textContent).to.eq('works');
});

it('setup included in renderer bundle', async () => {
const data = await fixture.readFile('/index.html')
const data = await fixture.readFile('/index.html');
const { document } = parseHTML(data);
const island = document.querySelector('astro-island');
const client = island.getAttribute('renderer-url');
expect(client).not.to.be.undefined;

const js = await fixture.readFile(client);
expect(js).to.match(/\w+\.component\(\"Bar\"/gm)
expect(js).to.match(/\w+\.component\(\"Bar\"/gm);
});
});

0 comments on commit 4866ff8

Please sign in to comment.