Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored and astrobot-houston committed Sep 12, 2022
1 parent 16113c3 commit d614be4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/astro/src/core/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function fixViteErrorMessage(_err: unknown, server?: ViteDevServer, fileP
try {
server?.ssrFixStacktrace(err);
} catch {}

// 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().
if (err.message === 'import.meta.glob() can only accept string literals.') {
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/vite-plugin-astro-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { preload, ssr } from '../core/render/dev/index.js';
import { RouteCache } from '../core/render/route-cache.js';
import { createRequest } from '../core/request.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';

interface AstroPluginOptions {
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/test/error-bad-js.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ describe('Errors in JavaScript', () => {
devServer = await fixture.startDevServer();
});

after(async() => {
after(async () => {
await devServer.stop();
});

it('Does not crash the dev server', async () => {
let res = await fixture.fetch('/');
let html = await res.text();

expect(html).to.include('ReferenceError');

res = await fixture.fetch('/');
Expand Down

0 comments on commit d614be4

Please sign in to comment.