Skip to content

Commit

Permalink
[Webpack loader]: Code processing completely rewritten using Typescri…
Browse files Browse the repository at this point in the history
…pt Compiler API (#913)

Signed-off-by: Vsevolod Volkov <[email protected]>

Signed-off-by: Vsevolod Volkov <[email protected]>
  • Loading branch information
StLyn4 authored Sep 20, 2022
1 parent c64916f commit f8c4473
Show file tree
Hide file tree
Showing 16 changed files with 1,552 additions and 1,030 deletions.
4 changes: 4 additions & 0 deletions __tests__/Trans.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,11 @@ describe('Trans', () => {
})

test('should work the same way than useTranslate with default value', () => {
console.warn = jest.fn()
const i18nKey = 'ns:number'
const expected = 'The number is 42'
const expectedWarning =
'[next-translate] "ns:number" is missing in current namespace configuration. Try adding "number" to the namespace "ns".'

const { container } = render(
<TestEnglish
Expand All @@ -123,6 +126,7 @@ describe('Trans', () => {
/>
)
expect(container.textContent).toContain(expected)
expect(console.warn).toBeCalledWith(expectedWarning)
})
})

Expand Down
Loading

0 comments on commit f8c4473

Please sign in to comment.