[ci] format

This commit is contained in:
matthewp 2022-09-12 18:43:54 +00:00 committed by fredkbot
parent 16113c3ae2
commit d614be4900
3 changed files with 4 additions and 4 deletions

View file

@ -51,7 +51,7 @@ export function fixViteErrorMessage(_err: unknown, server?: ViteDevServer, fileP
try { try {
server?.ssrFixStacktrace(err); server?.ssrFixStacktrace(err);
} catch {} } catch {}
// Fix: Astro.glob() compiles to import.meta.glob() by the time Vite sees it, // Fix: Astro.glob() compiles to import.meta.glob() by the time Vite sees it,
// so we need to update this error message in case it originally came from Astro.glob(). // so we need to update this error message in case it originally came from Astro.glob().
if (err.message === 'import.meta.glob() can only accept string literals.') { if (err.message === 'import.meta.glob() can only accept string literals.') {

View file

@ -20,7 +20,7 @@ import { preload, ssr } from '../core/render/dev/index.js';
import { RouteCache } from '../core/render/route-cache.js'; import { RouteCache } from '../core/render/route-cache.js';
import { createRequest } from '../core/request.js'; import { createRequest } from '../core/request.js';
import { createRouteManifest, matchAllRoutes } from '../core/routing/index.js'; import { createRouteManifest, matchAllRoutes } from '../core/routing/index.js';
import { createSafeError, resolvePages } from '../core/util.js'; import { resolvePages } from '../core/util.js';
import notFoundTemplate, { subpathNotUsedTemplate } from '../template/4xx.js'; import notFoundTemplate, { subpathNotUsedTemplate } from '../template/4xx.js';
interface AstroPluginOptions { interface AstroPluginOptions {

View file

@ -16,14 +16,14 @@ describe('Errors in JavaScript', () => {
devServer = await fixture.startDevServer(); devServer = await fixture.startDevServer();
}); });
after(async() => { after(async () => {
await devServer.stop(); await devServer.stop();
}); });
it('Does not crash the dev server', async () => { it('Does not crash the dev server', async () => {
let res = await fixture.fetch('/'); let res = await fixture.fetch('/');
let html = await res.text(); let html = await res.text();
expect(html).to.include('ReferenceError'); expect(html).to.include('ReferenceError');
res = await fixture.fetch('/'); res = await fixture.fetch('/');