[ci] format

This commit is contained in:
matthewp 2023-07-13 20:12:07 +00:00 committed by astrobot-houston
parent 213e10991a
commit 4ce2ba972a
4 changed files with 19 additions and 16 deletions

View file

@ -21,6 +21,7 @@ import { isServerLikeOutput } from '../../prerender/utils.js';
import { PAGE_SCRIPT_ID } from '../../vite-plugin-scripts/index.js'; import { PAGE_SCRIPT_ID } from '../../vite-plugin-scripts/index.js';
import { AstroError, AstroErrorData } from '../errors/index.js'; import { AstroError, AstroErrorData } from '../errors/index.js';
import { info } from '../logger/core.js'; import { info } from '../logger/core.js';
import { routeIsRedirect } from '../redirects/index.js';
import { getOutDirWithinCwd } from './common.js'; import { getOutDirWithinCwd } from './common.js';
import { generatePages } from './generate.js'; import { generatePages } from './generate.js';
import { trackPageData } from './internal.js'; import { trackPageData } from './internal.js';
@ -32,7 +33,6 @@ import { RESOLVED_SPLIT_MODULE_ID, SSR_VIRTUAL_MODULE_ID } from './plugins/plugi
import { ASTRO_PAGE_EXTENSION_POST_PATTERN } from './plugins/util.js'; import { ASTRO_PAGE_EXTENSION_POST_PATTERN } from './plugins/util.js';
import type { PageBuildData, StaticBuildOptions } from './types'; import type { PageBuildData, StaticBuildOptions } from './types';
import { getTimeStat } from './util.js'; import { getTimeStat } from './util.js';
import { routeIsRedirect } from '../redirects/index.js';
export async function viteBuild(opts: StaticBuildOptions) { export async function viteBuild(opts: StaticBuildOptions) {
const { allPages, settings } = opts; const { allPages, settings } = opts;

View file

@ -66,7 +66,7 @@ describe('routing - createRouteManifest', () => {
it('static redirect route is prioritized over dynamic file route', async () => { it('static redirect route is prioritized over dynamic file route', async () => {
const fs = createFs( const fs = createFs(
{ {
'/src/pages/[...slug].astro': `<h1>test</h1>` '/src/pages/[...slug].astro': `<h1>test</h1>`,
}, },
root root
); );
@ -74,16 +74,19 @@ describe('routing - createRouteManifest', () => {
{ {
trailingSlash: 'never', trailingSlash: 'never',
redirects: { redirects: {
'/foo': '/bar' '/foo': '/bar',
} },
}, },
root root
); );
const manifest = createRouteManifest({ const manifest = createRouteManifest(
{
cwd: fileURLToPath(root), cwd: fileURLToPath(root),
settings, settings,
fsMod: fs, fsMod: fs,
}, defaultLogging); },
defaultLogging
);
expect(manifest.routes[0].route).to.equal('/foo'); expect(manifest.routes[0].route).to.equal('/foo');
}); });