neuer checkout-pfad: /de/bestellen/paketID und /en/checkout/PackageID
This commit is contained in:
@@ -18,6 +18,13 @@ describe('buildLocalizedPath', () => {
|
||||
expect(buildLocalizedPath('/contact?ref=ad', 'de', supported)).toBe('/de/kontakt?ref=ad');
|
||||
});
|
||||
|
||||
it('rewrites localized prefixes with dynamic segments', () => {
|
||||
expect(buildLocalizedPath('/bestellen/123', 'en', supported, 'de', defaultLocaleRewrites))
|
||||
.toBe('/en/checkout/123');
|
||||
expect(buildLocalizedPath('/checkout/123', 'de', supported, 'de', defaultLocaleRewrites))
|
||||
.toBe('/de/bestellen/123');
|
||||
});
|
||||
|
||||
it('falls back to default locale when target not supported', () => {
|
||||
expect(buildLocalizedPath('/demo', 'fr', supported)).toBe('/de/demo');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user