mirror of
https://github.com/strapi/strapi.git
synced 2025-08-09 01:07:27 +00:00
18 lines
489 B
JavaScript
18 lines
489 B
JavaScript
![]() |
import React from 'react';
|
||
|
import { mount, shallow } from 'enzyme';
|
||
|
|
||
|
import { Initializer } from '../index';
|
||
|
|
||
|
describe('<Initializer />', () => {
|
||
|
it('should not crash', () => {
|
||
|
shallow(<Initializer updatePlugin={jest.fn()} />);
|
||
|
});
|
||
|
|
||
|
it('should call the updatePlugin props on mount', () => {
|
||
|
const props = { updatePlugin: jest.fn() };
|
||
|
mount(<Initializer {...props} />);
|
||
|
|
||
|
expect(props.updatePlugin).toHaveBeenCalledWith('users-permissions', 'isReady', true);
|
||
|
});
|
||
|
});
|