Skip to content

Commit aff62b3

Browse files
committed
Format
1 parent 522f640 commit aff62b3

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

packages/astro/test/units/routing/route-matching.test.js

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { createContainer } from '../../../dist/core/dev/container.js';
55
import { createViteLoader } from '../../../dist/core/module-loader/vite.js';
66
import { createRoutesList, matchAllRoutes } from '../../../dist/core/routing/index.js';
77
import { getSortedPreloadedMatches } from '../../../dist/prerender/routing.js';
8+
import { AstroServerPipeline } from '../../../dist/vite-plugin-app/pipeline.js';
89
import { createDevelopmentManifest } from '../../../dist/vite-plugin-astro-server/plugin.js';
910
import testAdapter from '../../test-adapter.js';
1011
import {
@@ -13,7 +14,6 @@ import {
1314
createRequestAndResponse,
1415
defaultLogger,
1516
} from '../test-utils.js';
16-
import { AstroServerPipeline } from '../../../dist/vite-plugin-app/pipeline.js';
1717

1818
const fileSystem = {
1919
'/src/pages/[serverDynamic].astro': `
@@ -151,7 +151,12 @@ describe('Route matching', () => {
151151
},
152152
defaultLogger,
153153
);
154-
pipeline = AstroServerPipeline.create(manifestData, { loader, logger: defaultLogger, manifest, settings });
154+
pipeline = AstroServerPipeline.create(manifestData, {
155+
loader,
156+
logger: defaultLogger,
157+
manifest,
158+
settings,
159+
});
155160
});
156161

157162
after(async () => {
@@ -161,7 +166,12 @@ describe('Route matching', () => {
161166
describe('Matched routes', () => {
162167
it('should be sorted correctly', async () => {
163168
const matches = matchAllRoutes('/try-matching-a-route', manifestData);
164-
const preloadedMatches = await getSortedPreloadedMatches({ pipeline, matches, settings, manifest });
169+
const preloadedMatches = await getSortedPreloadedMatches({
170+
pipeline,
171+
matches,
172+
settings,
173+
manifest,
174+
});
165175
const sortedRouteNames = preloadedMatches.map((match) => match.route.route);
166176

167177
assert.deepEqual(sortedRouteNames, [
@@ -175,7 +185,12 @@ describe('Route matching', () => {
175185
});
176186
it('nested should be sorted correctly', async () => {
177187
const matches = matchAllRoutes('/nested/try-matching-a-route', manifestData);
178-
const preloadedMatches = await getSortedPreloadedMatches({ pipeline, matches, settings, manifest });
188+
const preloadedMatches = await getSortedPreloadedMatches({
189+
pipeline,
190+
matches,
191+
settings,
192+
manifest,
193+
});
179194
const sortedRouteNames = preloadedMatches.map((match) => match.route.route);
180195

181196
assert.deepEqual(sortedRouteNames, [

packages/astro/test/units/vite-plugin-astro-server/request.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import * as assert from 'node:assert/strict';
22
import { after, before, describe, it } from 'node:test';
3+
import { serializeRouteData } from '../../../dist/core/app/index.js';
34
import { createContainer } from '../../../dist/core/dev/container.js';
45
import { createLoader } from '../../../dist/core/module-loader/index.js';
56
import { createRoutesList } from '../../../dist/core/routing/index.js';
67
import { createComponent, render } from '../../../dist/runtime/server/index.js';
8+
import { AstroServerApp } from '../../../dist/vite-plugin-app/app.js';
79
import { createController } from '../../../dist/vite-plugin-astro-server/index.js';
810
import { createDevelopmentManifest } from '../../../dist/vite-plugin-astro-server/plugin.js';
911
import testAdapter from '../../test-adapter.js';
@@ -14,8 +16,6 @@ import {
1416
createRequestAndResponse,
1517
defaultLogger,
1618
} from '../test-utils.js';
17-
import { serializeRouteData } from '../../../dist/core/app/index.js';
18-
import { AstroServerApp } from '../../../dist/vite-plugin-app/app.js';
1919

2020
async function createDevApp(overrides = {}, root) {
2121
const settings = overrides.settings ?? (await createBasicSettings({ root }));

pnpm-workspace.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ packages:
1212

1313
# Wait until three days after release to install new versions of packages
1414
minimumReleaseAge: 4320
15-

0 commit comments

Comments
 (0)