File tree Expand file tree Collapse file tree 19 files changed +23
-24
lines changed Expand file tree Collapse file tree 19 files changed +23
-24
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,7 @@ We'll be installing a lot of scripts from terminal. You may also want to conside
41
41
"test": "echo \"Error: no test specified\" && exit 1"
42
42
},
43
43
"dependencies": {
44
- "mocha-coderoad": "0.9.3",
45
- "coderoad-redux-js": "0.1.0"
44
+ "mocha-coderoad": "0.9.3"
46
45
},
47
46
"devDependencies": {
48
47
"babel-preset-es2015": "^6.9.0",
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ describe('02 createStore', () => {
3
3
const createStore = indexJs . __get__ ( 'createStore' ) ;
4
4
5
5
it ( 'isn\'t imported. `import { createStore } from "redux";`' , ( ) => {
6
- expect ( createStore ) . to . be . defined ;
7
- expect ( createStore ) . to . not . equal ( { } ) ;
6
+ console . log ( createStore ) ;
7
+ expect ( createStore ) . to . not . be . undefined ;
8
8
} ) ;
9
9
10
10
} ) ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ describe('03 store', () => {
3
3
const store = indexJs . __get__ ( 'store' ) ;
4
4
5
5
it ( 'isn\'t defined. `const store`' , ( ) => {
6
- expect ( store ) . to . be . defined ;
6
+ expect ( store ) . to . not . be . undefined ;
7
7
expect ( store ) . to . not . equal ( { } ) ;
8
8
} ) ;
9
9
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ const voteUp = indexJs.__get__('voteUp');
7
7
describe ( '01 voteUp Action' , ( ) => {
8
8
9
9
it ( 'isn\t created' , ( ) => {
10
- expect ( voteUp ) . to . be . defined ;
10
+ expect ( voteUp ) . to . not . be . undefined ;
11
11
} ) ;
12
12
13
13
if ( typeof voteUp === 'function' ) {
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ describe('04 VOTE_UP action type', () => {
3
3
const VOTE_UP = indexJs . __get__ ( 'VOTE_UP' ) ;
4
4
5
5
it ( 'doesn\t exist' , ( ) => {
6
- expect ( VOTE_UP ) . to . be . defined ;
6
+ expect ( VOTE_UP ) . to . not . be . undefined ;
7
7
} ) ;
8
8
9
9
it ( 'doesn\'t exist' , ( ) => {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const reducer = indexJs.__get__('reducer');
12
12
describe ( '01 reducer' , ( ) => {
13
13
14
14
it ( 'doesn\'t exist' , ( ) => {
15
- expect ( reducer ) . to . be . defined ;
15
+ expect ( reducer ) . to . not . be . undefined ;
16
16
} ) ;
17
17
18
18
it ( 'doesn\'t take a "state" param' , ( ) => {
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ describe('01 the pure reducer', () => {
22
22
const testAction = ( { type : 'VOTE_UP' , payload : { id : 100 } } ) ;
23
23
24
24
it ( 'should have a reducer' , ( ) => {
25
- expect ( reducer ) . to . be . defined ;
25
+ expect ( reducer ) . to . not . be . undefined ;
26
26
} )
27
27
28
28
it ( 'should increment the votes matching the id only' , ( ) => {
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const defaultPokemon = indexJs.__get__('defaultPokemon');
10
10
describe ( '01 reducers' , ( ) => {
11
11
12
12
it ( 'doesn\'t exist' , ( ) => {
13
- expect ( reducers ) . to . be . defined ;
13
+ expect ( reducers ) . to . not . be . undefined ;
14
14
} ) ;
15
15
16
16
it ( 'should be set to "reducer"' , ( ) => {
Original file line number Diff line number Diff line change 1
1
describe ( '02 "pokemon"' , ( ) => {
2
2
3
3
it ( 'should be the reducer new name' , ( ) => {
4
- expect ( pokemon ) . to . be . defined ;
4
+ expect ( pokemon ) . to . not . be . undefined ;
5
5
} ) ;
6
6
7
7
it ( 'should be the reducer function' , ( ) => {
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ describe('03 combineReducers', () => {
3
3
const combineReducers = indexJs . __get__ ( 'combineReducers' ) ;
4
4
5
5
it ( 'should be loaded' , ( ) => {
6
- expect ( combineReducers ) . to . be . defined ;
6
+ expect ( combineReducers ) . to . not . be . undefined ;
7
7
} ) ;
8
8
9
9
} ) ;
Original file line number Diff line number Diff line change 1
1
describe ( '06 defaultPokemon' , ( ) => {
2
2
3
3
it ( 'doesn\'t exist' , ( ) => {
4
- expect ( defaultPokemon ) . to . be . defined ;
4
+ expect ( defaultPokemon ) . to . not . be . undefined ;
5
5
} ) ;
6
6
7
7
it ( 'should be a list of three pokemon' , ( ) => {
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ describe('02 VOTE_UP', () => {
4
4
const VOTE_UP = pokemonIndexJs . __get__ ( 'VOTE_UP' ) ;
5
5
6
6
it ( 'should now be in "pokemon/index.js"' , ( ) => {
7
- expect ( VOTE_UP ) . to . be . defined ;
7
+ expect ( VOTE_UP ) . to . not . be . undefined ;
8
8
expect ( VOTE_UP ) . to . equal ( 'VOTE_UP' ) ;
9
9
} ) ;
10
10
Original file line number Diff line number Diff line change @@ -2,19 +2,19 @@ describe('03 "voteUp"', () => {
2
2
3
3
it ( 'should be in "pokemon/index.js"' , ( ) => {
4
4
const voteUp = pokemonIndexJs . __get__ ( 'voteUp' ) ;
5
- expect ( voteUp ) . to . be . defined ;
5
+ expect ( voteUp ) . to . not . be . undefined ;
6
6
expect ( typeof voteUp ) . to . equal ( 'function' ) ;
7
7
} ) ;
8
8
9
9
it ( 'should be a named export' , ( ) => {
10
10
const voteUp = require ( 'BASE/pokemon/index.js' ) . voteUp ;
11
- expect ( voteUp ) . to . be . defined ;
11
+ expect ( voteUp ) . to . not . be . undefined ;
12
12
expect ( typeof voteUp ) . to . equal ( 'function' ) ;
13
13
} ) ;
14
14
15
15
it ( 'should no longer be in the root "index.js"' , ( ) => {
16
16
const voteUp = indexJs . __get__ ( 'voteUp' ) ;
17
- expect ( voteUp ) . not . to . be . defined ;
17
+ expect ( voteUp ) . not . to . not . be . undefined ;
18
18
} ) ;
19
19
20
20
} ) ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ describe('04 "pokemon" reducer', () => {
2
2
3
3
it ( 'should be in "pokemon/index.js"' , ( ) => {
4
4
const pokemon = pokemonIndexJs . __get__ ( 'pokemon' ) ;
5
- expect ( pokemon ) . to . be . defined ;
5
+ expect ( pokemon ) . to . not . be . undefined ;
6
6
expect ( typeof pokemon ) . to . equal ( 'function' ) ;
7
7
expect ( pokemon ( { } , { type : 'ANY' } ) ) . to . deep . equal ( { } ) ;
8
8
} ) ;
@@ -14,7 +14,7 @@ describe('04 "pokemon" reducer', () => {
14
14
15
15
it ( 'should be a default export' , ( ) => {
16
16
const pokemon = require ( 'BASE/pokemon/index.js' ) ;
17
- expect ( pokemon ) . to . be . defined ;
17
+ expect ( pokemon ) . to . not . be . undefined ;
18
18
expect ( typeof pokemon ) . to . equal ( 'function' ) ;
19
19
expect ( pokemon ( { } , { type : 'ANY' } ) ) . to . deep . equal ( { } ) ;
20
20
} ) ;
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ describe('01 applyMiddleware', () => {
12
12
const applyMiddleware = indexJs . __get__ ( 'applyMiddleware' ) ;
13
13
14
14
it ( 'should be imported' , ( ) => {
15
- expect ( applyMiddleware ) . to . be . defined ;
15
+ expect ( applyMiddleware ) . to . not . be . undefined ;
16
16
} ) ;
17
17
18
18
} ) ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ describe('04 logger', () => {
3
3
const logger = indexJs . __get__ ( 'logger' ) ;
4
4
5
5
it ( 'doesn\'t exist' , ( ) => {
6
- expect ( logger ) . to . be . defined ;
6
+ expect ( logger ) . to . not . be . undefined ;
7
7
} ) ;
8
8
9
9
it ( 'should be set to `createLogger()`' , ( ) => {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ describe('01 SORT_BY_POPULARITY action type', () => {
12
12
const SORT_BY_POPULARITY = pokemonIndexJs . __get__ ( 'SORT_BY_POPULARITY' ) ;
13
13
14
14
it ( 'doesn\'t exist' , ( ) => {
15
- expect ( SORT_BY_POPULARITY ) . to . be . defined ;
15
+ expect ( SORT_BY_POPULARITY ) . to . not . be . undefined ;
16
16
} ) ;
17
17
18
18
it ( 'should equal the string "SORT_BY_POPULARITY"' , ( ) => {
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ describe('02 sortByPopularity action creator', () => {
3
3
const sortByPopularity = pokemonIndexJs . __get__ ( 'sortByPopularity' ) ;
4
4
5
5
it ( 'doesn\'t exist' , ( ) => {
6
- expect ( sortByPopularity ) . to . be . defined ;
6
+ expect ( sortByPopularity ) . to . not . be . undefined ;
7
7
} ) ;
8
8
9
9
it ( 'should equal the string "SORT_BY_POPULARITY"' , ( ) => {
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ describe('02 thunk', () => {
3
3
const thunk = indexJs . __get__ ( 'thunk' ) ;
4
4
5
5
it ( 'should be imported' , ( ) => {
6
- expect ( thunk ) . to . be . defined ;
6
+ expect ( thunk ) . to . not . be . undefined ;
7
7
} ) ;
8
8
9
9
// more specific check
You can’t perform that action at this time.
0 commit comments