Revision 89b8fc37
Added by Amir Fefer over 4 years ago
webpack/assets/javascripts/react_app/components/hosts/powerStatus/PowerStatus.test.js | ||
---|---|---|
import toJson from 'enzyme-to-json';
|
||
import { shallow } from 'enzyme';
|
||
import { shallow } from '@theforeman/test';
|
||
import React from 'react';
|
||
import configureMockStore from 'redux-mock-store';
|
||
import thunk from 'redux-thunk';
|
||
... | ... | |
|
||
const error = box.render();
|
||
|
||
expect(toJson(error)).toMatchSnapshot();
|
||
expect(error).toMatchSnapshot();
|
||
});
|
||
|
||
it('resolvedWithOn', () => {
|
||
... | ... | |
|
||
const resolvedOnBoxRendered = resolvedOnBox.render();
|
||
|
||
expect(toJson(resolvedOnBoxRendered)).toMatchSnapshot();
|
||
expect(resolvedOnBoxRendered).toMatchSnapshot();
|
||
});
|
||
|
||
it('resolvedWithOff', () => {
|
||
... | ... | |
|
||
const resolvedOffBoxRendered = resolvedOnBox.render();
|
||
|
||
expect(toJson(resolvedOffBoxRendered)).toMatchSnapshot();
|
||
expect(resolvedOffBoxRendered).toMatchSnapshot();
|
||
});
|
||
});
|
Also available in: Unified diff
Fixes #28488 - consume jest config from env