mirror of
https://github.com/wassname/react-webpack-template.git
synced 2026-07-11 01:40:17 +08:00
Added ability to unit test features.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/*eslint-env node, mocha */
|
||||
/*global expect */
|
||||
/*eslint no-console: 0*/
|
||||
'use strict';
|
||||
|
||||
// Uncomment the following lines to use the react test utilities
|
||||
// import React from 'react/addons';
|
||||
// const TestUtils = React.addons.TestUtils;
|
||||
import createComponent from 'helpers/shallowRenderHelper';
|
||||
|
||||
import Main from 'components/Main';
|
||||
|
||||
describe('MainComponent', () => {
|
||||
let MainComponent;
|
||||
|
||||
beforeEach(() => {
|
||||
MainComponent = createComponent(Main);
|
||||
});
|
||||
|
||||
it('should have its component name as default className', () => {
|
||||
expect(MainComponent._store.props.className).to.equal('index');
|
||||
});
|
||||
|
||||
it('should do something!', () => {
|
||||
expect(true).to.be.true;
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user