File tree Expand file tree Collapse file tree 3 files changed +23
-21
lines changed Expand file tree Collapse file tree 3 files changed +23
-21
lines changed Original file line number Diff line number Diff line change 66
77### 動作環境
88
9- * Node.js : 6以上
9+ * Node.js : 8以上
1010
1111### セットアップ
1212
@@ -49,7 +49,7 @@ $ npm test
4949
5050 2 passing (9ms)
5151
52- $
52+ $
5353```
5454
5555### コマンド
Original file line number Diff line number Diff line change 1- function Sample ( ) {
1+ class Sample {
2+ constructor ( ) {
23 this . status = true ;
3- }
4+ }
45
5- Sample . prototype . say = function ( ) {
6+ say ( ) {
67 return 'Hello TDDBC!' ;
7- } ;
8+ }
9+ }
810
911module . exports = Sample ;
Original file line number Diff line number Diff line change 1- var assert = require ( 'assert' ) ;
1+ const assert = require ( 'assert' ) ;
22
3- var Sample = require ( '../lib/sample' ) ;
3+ const Sample = require ( '../lib/sample' ) ;
44
5- describe ( 'Sample' , function ( ) {
6- var sut ;
5+ describe ( 'Sample' , ( ) => {
6+ let sut ;
77
8- beforeEach ( function ( ) {
9- sut = new Sample ( ) ;
10- } ) ;
8+ beforeEach ( ( ) => {
9+ sut = new Sample ( ) ;
10+ } ) ;
1111
12- describe ( '.status' , function ( ) {
13- it ( 'は、trueであるべき' , function ( ) {
14- assert . ok ( sut . status === true ) ;
15- } ) ;
12+ describe ( '.status' , ( ) => {
13+ it ( 'は、trueであるべき' , ( ) => {
14+ assert . ok ( sut . status === true ) ;
1615 } ) ;
16+ } ) ;
1717
18- describe ( '#say()' , function ( ) {
19- it ( 'は、"Hello TDDBC!"が返ってくるべき' , function ( ) {
20- assert ( sut . say ( ) === 'Hello TDDBC!' ) ;
21- } ) ;
18+ describe ( '#say()' , ( ) => {
19+ it ( 'は、"Hello TDDBC!"が返ってくるべき' , ( ) => {
20+ assert ( sut . say ( ) === 'Hello TDDBC!' ) ;
2221 } ) ;
22+ } ) ;
2323} ) ;
You can’t perform that action at this time.
0 commit comments