Skip to content

Commit adada37

Browse files
author
Kuniwak
committed
Merge branch '2015' of github.com:mixi-inc/JavaScriptTraining into 2015-example-solution
2 parents 22c7a7c + 53634f2 commit adada37

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

.eslintrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
"no-use-before-define": [2, "nofunc"],
1111

1212
"//": "この形式のキャストはくっついていないと読みづらい",
13-
"space-infix-ops": [2, { "int32Hint": false }]
13+
"space-infix-ops": [2, { "int32Hint": false }],
14+
15+
"//": "ガード節の読みやすさを重視して、一行の場合のみ許可する",
16+
"curly": [2, "multi-line"]
1417
}
1518
}

public/stage5/tests.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ describe('ステージ5(意図通りに非同期処理を利用できる)',
9494
});
9595

9696

97-
return expect(promisedFriends).to.eventually.deep.equal(['PYXC-PJ']);
97+
return expect(promisedFriends).to.eventually.have.length(1)
98+
.and.have.members(['PYXC-PJ']);
9899
});
99100

100101

@@ -109,9 +110,8 @@ describe('ステージ5(意図通りに非同期処理を利用できる)',
109110
});
110111

111112

112-
return expect(promisedFriends).to.eventually.deep.equal(
113-
['jisp', 'TeJaS']
114-
);
113+
return expect(promisedFriends).to.eventually.have.length(2)
114+
.and.have.members(['jisp', 'TeJaS']);
115115
});
116116

117117

@@ -157,7 +157,8 @@ describe('ステージ5(意図通りに非同期処理を利用できる)',
157157
});
158158

159159

160-
return expect(promisedFriends).to.eventually.deep.equal(['TypeScript']);
160+
return expect(promisedFriends).to.eventually.have.length(1)
161+
.and.have.members(['TypeScript']);
161162
});
162163

163164

@@ -317,7 +318,8 @@ describe('ステージ5(意図通りに非同期処理を利用できる)',
317318
languages.map(searchMostPoluarRepoByLanguage));
318319

319320

320-
return expect(mostPopularRepos).to.eventually.have.length(2);
321+
return expect(mostPopularRepos).to.eventually.have.length(2)
322+
.and.satisfy(function(name) { return typeof name === 'string'; });
321323

322324
// Github API に関する参考情報
323325
// https://developer.github.com/v3/search

0 commit comments

Comments
 (0)