MCPcopy
hub / github.com/vercel/next.js / addDefaultLocaleCookie

Function addDefaultLocaleCookie

test/integration/i18n-support/test/shared.ts:32–37  ·  view source on GitHub ↗
(browser)

Source from the content-addressed store, hash-verified

30export const locales = [...nonDomainLocales, ...domainLocales]
31
32async function addDefaultLocaleCookie(browser) {
33 // make sure default locale is used in case browser isn't set to
34 // favor en-US by default, (we use all caps to ensure it's case-insensitive)
35 await browser.addCookie({ name: 'NEXT_LOCALE', value: 'EN-US' })
36 await browser.refresh()
37}
38
39export function runTests(ctx) {
40 if (ctx.basePath) {

Callers 1

runTestsFunction · 0.85

Calls 2

addCookieMethod · 0.80
refreshMethod · 0.65

Tested by

no test coverage detected