This repository was archived by the owner on Apr 11, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
app/src/containers/FeatureFirstContainer/tests Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,13 @@ import expect from 'expect';
33import React from 'react' ;
44import { shallow } from 'enzyme' ;
55
6+ // We are testing our react components using
7+ // Airbnb's enzyme
8+ // Checkout https://medium.com/airbnb-engineering/enzyme-javascript-testing-utilities-for-react-a417e5e5090f#.n5bteqyp4
9+ // When testing connected containers, things can be a little trickier
10+ // because you need to mock the store in order to test the components
11+ // in total isolation.
12+ // SEE: http://redux.js.org/docs/recipes/WritingTests.html
613function setup ( ) {
714 const props = {
815 isLoading : true ,
@@ -15,6 +22,7 @@ function setup() {
1522 wrapper,
1623 } ;
1724}
25+
1826describe ( '<FeatureFirstContainer />' , ( ) => {
1927 it ( 'should show a loading indicator while loading' , ( ) => {
2028 const {
Original file line number Diff line number Diff line change 2828 "deploy" : " NODE_ENV=production `npm bin`/webpack -p" ,
2929 "start" : " npm run dev" ,
3030 "clean" : " rm -rf app/dist app/build" ,
31- "setup" : " npm install" ,
32- "devtest" : " webpack-dev-server --config ./config/webpack/webpack.test.babel.js" ,
33- "test2" : " NODE_ENV=test mocha --compilers js:babel-core/register --require config/testing/test-bundler \" ./app/src/**/*.test.js\" "
31+ "setup" : " npm install"
3432 },
3533 "repository" : {
3634 "type" : " git" ,
You can’t perform that action at this time.
0 commit comments