mirror of https://github.com/mastodon/mastodon
set up Mocha/Chai/Enzyme for React component unit testing
parent
77efdfa110
commit
d7c55853e9
@ -0,0 +1,13 @@
|
||||
import { expect } from 'chai';
|
||||
import { shallow } from 'enzyme';
|
||||
import React from 'react';
|
||||
global.React = React;
|
||||
|
||||
import LoadingIndicator from '../../../app/assets/javascripts/components/components/loading_indicator'
|
||||
|
||||
describe('<LoadingIndicator />', function() {
|
||||
it('renders text that indicates loading', function() {
|
||||
const wrapper = shallow(<LoadingIndicator />);
|
||||
expect(wrapper.text()).to.match(/loading/i);
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue