Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored and astrobot-houston committed Jan 31, 2025
1 parent 0fa5c82 commit 2a85bd7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion packages/astro/src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/i18n/middleware.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -10,7 +11,6 @@ import {
redirectToFallback,
requestHasLocale,
} from './index.js';
import { isRequestServerIsland, requestIs404Or500 } from '../core/routing/match.js';

export function createI18nMiddleware(
i18n: SSRManifest['i18n'],
Expand Down
9 changes: 4 additions & 5 deletions packages/astro/test/i18n-routing.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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} */
Expand All @@ -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');
Expand All @@ -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');
});
})
});

0 comments on commit 2a85bd7

Please sign in to comment.