0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/examples/container-with-vitest/test/[locale].test.ts
Emanuele Stoppa b15949f8fa [ci] format
2024-05-22 11:12:30 +00:00

16 lines
463 B
TypeScript

import { experimental_AstroContainer as AstroContainer } from 'astro/container';
import { expect, test } from 'vitest';
import Locale from '../src/pages/[locale].astro';
test('Dynamic route', async () => {
const container = await AstroContainer.create();
// @ts-ignore
const result = await container.renderToString(Locale, {
params: {
locale: 'en',
},
request: new Request('http://example.com/en'),
});
expect(result).toContain('Locale: en');
});