summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/astro/src/i18n/index.ts1
-rw-r--r--packages/astro/src/i18n/middleware.ts2
-rw-r--r--packages/astro/test/i18n-routing.test.js9
3 files changed, 5 insertions, 7 deletions
diff --git a/packages/astro/src/i18n/index.ts b/packages/astro/src/i18n/index.ts
index 246189f86..73b33fa60 100644
--- a/packages/astro/src/i18n/index.ts
+++ b/packages/astro/src/i18n/index.ts
@@ -4,7 +4,6 @@ import { shouldAppendForwardSlash } from '../core/build/util.js';
import { REROUTE_DIRECTIVE_HEADER } from '../core/constants.js';
import { MissingLocale, i18nNoLocaleFoundInPath } from '../core/errors/errors-data.js';
import { AstroError } from '../core/errors/index.js';
-import { isRoute404, isRoute500 } from '../core/routing/match.js';
import type { AstroConfig, Locales, ValidRedirectStatus } from '../types/public/config.js';
import type { APIContext } from '../types/public/context.js';
import { createI18nMiddleware } from './middleware.js';
diff --git a/packages/astro/src/i18n/middleware.ts b/packages/astro/src/i18n/middleware.ts
index 0f98fd4e2..6b8407498 100644
--- a/packages/astro/src/i18n/middleware.ts
+++ b/packages/astro/src/i18n/middleware.ts
@@ -1,5 +1,6 @@
import type { SSRManifest, SSRManifestI18n } from '../core/app/types.js';
import { REROUTE_DIRECTIVE_HEADER, ROUTE_TYPE_HEADER } from '../core/constants.js';
+import { isRequestServerIsland, requestIs404Or500 } from '../core/routing/match.js';
import type { MiddlewareHandler } from '../types/public/common.js';
import type { APIContext } from '../types/public/context.js';
import {
@@ -10,7 +11,6 @@ import {
redirectToFallback,
requestHasLocale,
} from './index.js';
-import { isRequestServerIsland, requestIs404Or500 } from '../core/routing/match.js';
export function createI18nMiddleware(
i18n: SSRManifest['i18n'],
diff --git a/packages/astro/test/i18n-routing.test.js b/packages/astro/test/i18n-routing.test.js
index b5ecec60e..ed159aed2 100644
--- a/packages/astro/test/i18n-routing.test.js
+++ b/packages/astro/test/i18n-routing.test.js
@@ -2169,8 +2169,7 @@ describe('Fallback rewrite SSR', () => {
});
});
-
-describe("i18n routing with server islands", () => {
+describe('i18n routing with server islands', () => {
/** @type {import('./test-utils').Fixture} */
let fixture;
/** @type {import('./test-utils').DevServer} */
@@ -2182,10 +2181,10 @@ describe("i18n routing with server islands", () => {
});
devServer = await fixture.startDevServer();
});
-
+
after(async () => {
await devServer.stop();
- })
+ });
it('should render the en locale with server island', async () => {
const res = await fixture.fetch('/en/island');
@@ -2194,4 +2193,4 @@ describe("i18n routing with server islands", () => {
const serverIslandScript = $('script[data-island-id]');
assert.equal(serverIslandScript.length, 1, 'has the island script');
});
-})
+});