mirror of
https://github.com/ansible/awx.git
synced 2026-03-23 03:45:01 -02:30
Add support for i18n using lingui
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import { I18nProvider } from '@lingui/react';
|
||||
import LogoutButton from '../../src/components/LogoutButton';
|
||||
|
||||
let buttonWrapper;
|
||||
@@ -14,7 +15,11 @@ const findChildren = () => {
|
||||
describe('<LogoutButton />', () => {
|
||||
test('initially renders without crashing', () => {
|
||||
const onDevLogout = jest.fn();
|
||||
buttonWrapper = mount(<LogoutButton onDevLogout={onDevLogout} />);
|
||||
buttonWrapper = mount(
|
||||
<I18nProvider>
|
||||
<LogoutButton onDevLogout={onDevLogout} />
|
||||
</I18nProvider>
|
||||
);
|
||||
findChildren();
|
||||
expect(buttonWrapper.length).toBe(1);
|
||||
expect(buttonElem.length).toBe(1);
|
||||
|
||||
Reference in New Issue
Block a user