vtex/test-tools

Locale is not working to test different different languages

Closed this issue · 0 comments

These two approaches:

"vtexTestTools": {
    "defaultLocale": "pt"
  },

or

test('should render the example translated to portuguese', () => {
  const { getByText } = render(
    <HelloWorld />,
    { locale: 'pt' }
  )

  const element = getByText(/Olá!/)

  expect(element).toBeDefined()
})

are not working as expected and they are falling into the default language (english)