Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7c78533

Browse files
committed
change to.be.defined -> to.not.be.undefined, working version
1 parent248ad58 commit7c78533

File tree

19 files changed

+23
-24
lines changed

19 files changed

+23
-24
lines changed

‎tutorial/01/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ We'll be installing a lot of scripts from terminal. You may also want to conside
4141
"test": "echo \"Error: no test specified\" && exit 1"
4242
},
4343
"dependencies": {
44-
"mocha-coderoad": "0.9.3",
45-
"coderoad-redux-js": "0.1.0"
44+
"mocha-coderoad": "0.9.3"
4645
},
4746
"devDependencies": {
4847
"babel-preset-es2015": "^6.9.0",

‎tutorial/02/02.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ describe('02 createStore', () => {
33
constcreateStore=indexJs.__get__('createStore');
44

55
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;
88
});
99

1010
});

‎tutorial/02/03.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ describe('03 store', () => {
33
conststore=indexJs.__get__('store');
44

55
it('isn\'t defined. `const store`',()=>{
6-
expect(store).to.be.defined;
6+
expect(store).to.not.be.undefined;
77
expect(store).to.not.equal({});
88
});
99

‎tutorial/03/01.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const voteUp = indexJs.__get__('voteUp');
77
describe('01 voteUp Action',()=>{
88

99
it('isn\t created',()=>{
10-
expect(voteUp).to.be.defined;
10+
expect(voteUp).to.not.be.undefined;
1111
});
1212

1313
if(typeofvoteUp==='function'){

‎tutorial/03/04.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ describe('04 VOTE_UP action type', () => {
33
constVOTE_UP=indexJs.__get__('VOTE_UP');
44

55
it('doesn\t exist',()=>{
6-
expect(VOTE_UP).to.be.defined;
6+
expect(VOTE_UP).to.not.be.undefined;
77
});
88

99
it('doesn\'t exist',()=>{

‎tutorial/04/01.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const reducer = indexJs.__get__('reducer');
1212
describe('01 reducer',()=>{
1313

1414
it('doesn\'t exist',()=>{
15-
expect(reducer).to.be.defined;
15+
expect(reducer).to.not.be.undefined;
1616
});
1717

1818
it('doesn\'t take a "state" param',()=>{

‎tutorial/05/01.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('01 the pure reducer', () => {
2222
consttestAction=({type:'VOTE_UP',payload:{id:100}});
2323

2424
it('should have a reducer',()=>{
25-
expect(reducer).to.be.defined;
25+
expect(reducer).to.not.be.undefined;
2626
})
2727

2828
it('should increment the votes matching the id only',()=>{

‎tutorial/06/01.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const defaultPokemon = indexJs.__get__('defaultPokemon');
1010
describe('01 reducers',()=>{
1111

1212
it('doesn\'t exist',()=>{
13-
expect(reducers).to.be.defined;
13+
expect(reducers).to.not.be.undefined;
1414
});
1515

1616
it('should be set to "reducer"',()=>{

‎tutorial/06/02.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
describe('02 "pokemon"',()=>{
22

33
it('should be the reducer new name',()=>{
4-
expect(pokemon).to.be.defined;
4+
expect(pokemon).to.not.be.undefined;
55
});
66

77
it('should be the reducer function',()=>{

‎tutorial/06/03.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ describe('03 combineReducers', () => {
33
constcombineReducers=indexJs.__get__('combineReducers');
44

55
it('should be loaded',()=>{
6-
expect(combineReducers).to.be.defined;
6+
expect(combineReducers).to.not.be.undefined;
77
});
88

99
});

‎tutorial/06/06.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
describe('06 defaultPokemon',()=>{
22

33
it('doesn\'t exist',()=>{
4-
expect(defaultPokemon).to.be.defined;
4+
expect(defaultPokemon).to.not.be.undefined;
55
});
66

77
it('should be a list of three pokemon',()=>{

‎tutorial/07/02.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ describe('02 VOTE_UP', () => {
44
constVOTE_UP=pokemonIndexJs.__get__('VOTE_UP');
55

66
it('should now be in "pokemon/index.js"',()=>{
7-
expect(VOTE_UP).to.be.defined;
7+
expect(VOTE_UP).to.not.be.undefined;
88
expect(VOTE_UP).to.equal('VOTE_UP');
99
});
1010

‎tutorial/07/03.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ describe('03 "voteUp"', () => {
22

33
it('should be in "pokemon/index.js"',()=>{
44
constvoteUp=pokemonIndexJs.__get__('voteUp');
5-
expect(voteUp).to.be.defined;
5+
expect(voteUp).to.not.be.undefined;
66
expect(typeofvoteUp).to.equal('function');
77
});
88

99
it('should be a named export',()=>{
1010
constvoteUp=require('BASE/pokemon/index.js').voteUp;
11-
expect(voteUp).to.be.defined;
11+
expect(voteUp).to.not.be.undefined;
1212
expect(typeofvoteUp).to.equal('function');
1313
});
1414

1515
it('should no longer be in the root "index.js"',()=>{
1616
constvoteUp=indexJs.__get__('voteUp');
17-
expect(voteUp).not.to.be.defined;
17+
expect(voteUp).not.to.not.be.undefined;
1818
});
1919

2020
});

‎tutorial/07/04.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ describe('04 "pokemon" reducer', () => {
22

33
it('should be in "pokemon/index.js"',()=>{
44
constpokemon=pokemonIndexJs.__get__('pokemon');
5-
expect(pokemon).to.be.defined;
5+
expect(pokemon).to.not.be.undefined;
66
expect(typeofpokemon).to.equal('function');
77
expect(pokemon({},{type:'ANY'})).to.deep.equal({});
88
});
@@ -14,7 +14,7 @@ describe('04 "pokemon" reducer', () => {
1414

1515
it('should be a default export',()=>{
1616
constpokemon=require('BASE/pokemon/index.js');
17-
expect(pokemon).to.be.defined;
17+
expect(pokemon).to.not.be.undefined;
1818
expect(typeofpokemon).to.equal('function');
1919
expect(pokemon({},{type:'ANY'})).to.deep.equal({});
2020
});

‎tutorial/08/01.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('01 applyMiddleware', () => {
1212
constapplyMiddleware=indexJs.__get__('applyMiddleware');
1313

1414
it('should be imported',()=>{
15-
expect(applyMiddleware).to.be.defined;
15+
expect(applyMiddleware).to.not.be.undefined;
1616
});
1717

1818
});

‎tutorial/08/04.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ describe('04 logger', () => {
33
constlogger=indexJs.__get__('logger');
44

55
it('doesn\'t exist',()=>{
6-
expect(logger).to.be.defined;
6+
expect(logger).to.not.be.undefined;
77
});
88

99
it('should be set to `createLogger()`',()=>{

‎tutorial/09/01.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('01 SORT_BY_POPULARITY action type', () => {
1212
constSORT_BY_POPULARITY=pokemonIndexJs.__get__('SORT_BY_POPULARITY');
1313

1414
it('doesn\'t exist',()=>{
15-
expect(SORT_BY_POPULARITY).to.be.defined;
15+
expect(SORT_BY_POPULARITY).to.not.be.undefined;
1616
});
1717

1818
it('should equal the string "SORT_BY_POPULARITY"',()=>{

‎tutorial/09/02.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ describe('02 sortByPopularity action creator', () => {
33
constsortByPopularity=pokemonIndexJs.__get__('sortByPopularity');
44

55
it('doesn\'t exist',()=>{
6-
expect(sortByPopularity).to.be.defined;
6+
expect(sortByPopularity).to.not.be.undefined;
77
});
88

99
it('should equal the string "SORT_BY_POPULARITY"',()=>{

‎tutorial/10/02.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ describe('02 thunk', () => {
33
constthunk=indexJs.__get__('thunk');
44

55
it('should be imported',()=>{
6-
expect(thunk).to.be.defined;
6+
expect(thunk).to.not.be.undefined;
77
});
88

99
// more specific check

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp