File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
source/use-case/nodecli/refactor-and-unittest/src/test Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 3232 "test:example" : " mocha test/" ,
3333 "test:basic" : " mocha \" ./source/basic/**/*-test.js\" " ,
3434 "test:nodecli" : " cd ./source/use-case/nodecli && npm install && npm test" ,
35+ "test:nodecli-unittest" : " cd ./source/use-case/nodecli/refactor-and-unittest/src/test && npm install && npm test" ,
3536 "test:ajaxapp" : " mocha \" ./source/use-case/ajaxapp/!(node_modules)**/*-test.js\" " ,
3637 "test:todoapp" : " cd ./source/use-case/todoapp && npm install && npm test" ,
3738 "test" : " npm-run-all -l --parallel test:* lint" ,
Original file line number Diff line number Diff line change @@ -7,14 +7,14 @@ it("converts Markdown to HTML (GFM=false)", () => {
77 // fs.readFileSyncは同期的にファイルを読み込むメソッド
88 const sample = fs . readFileSync ( path . resolve ( __dirname , "./fixtures/sample.md" ) , { encoding : "utf8" } ) ;
99 const expected = fs . readFileSync ( path . resolve ( __dirname , "./fixtures/expected.html" ) , { encoding : "utf8" } ) ;
10-
11- assert . strictEqual ( md2html ( sample , { gfm : false } ) , expected ) ;
10+ // 末尾の改行の有無の違いを無視するため、変換後のHTMLのスペースをtrimメソッドで削除してから比較しています
11+ assert . strictEqual ( md2html ( sample , { gfm : false } ) . trimEnd ( ) , expected . trimEnd ( ) ) ;
1212} ) ;
1313
1414it ( "converts Markdown to HTML (GFM=true)" , ( ) => {
1515 const sample = fs . readFileSync ( path . resolve ( __dirname , "./fixtures/sample.md" ) , { encoding : "utf8" } ) ;
1616 const expected = fs . readFileSync ( path . resolve ( __dirname , "./fixtures/expected-gfm.html" ) , { encoding : "utf8" } ) ;
17-
18- assert . strictEqual ( md2html ( sample , { gfm : true } ) , expected ) ;
17+ // 末尾の改行の有無の違いを無視するため、変換後のHTMLのスペースをtrimメソッドで削除してから比較しています
18+ assert . strictEqual ( md2html ( sample , { gfm : true } ) . trimEnd ( ) , expected . trimEnd ( ) ) ;
1919} ) ;
2020
You can’t perform that action at this time.
0 commit comments