[ci] format
This commit is contained in:
parent
d25f54cb93
commit
4866ff882a
4 changed files with 7 additions and 7 deletions
|
@ -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) =>
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -8,13 +8,13 @@ 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;
|
||||
|
@ -22,13 +22,13 @@ describe('App Entrypoint', () => {
|
|||
});
|
||||
|
||||
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);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue