File tree Expand file tree Collapse file tree
32-The-Basics-of-Testing/06-movies/test Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ it ( 'Shows an autocomplete' , ( ) => {
2+ createAutoComplete ( {
3+ root : document . querySelector ( '#target' ) ,
4+ fetchData ( ) {
5+ return [
6+ { Title : 'Blade Runner' } ,
7+ { Title : 'Redemption of the Ghost' } ,
8+ { Title : 'Die hard' } ,
9+ ]
10+ } ,
11+ renderOption ( movie ) {
12+ return movie . Title
13+ }
14+ } )
15+ } )
Original file line number Diff line number Diff line change 88 </ head >
99 < body >
1010 < div id ="mocha "> </ div >
11+ < div id ="target "> </ div >
1112
1213 < script src ="https://unpkg.com/chai/chai.js "> </ script >
1314 < script src ="https://unpkg.com/mocha/mocha.js "> </ script >
1617 mocha . setup ( 'bdd' )
1718 mocha . checkLeaks ( )
1819 </ script >
19- < script src ="test.array .js "> </ script >
20- < script src ="test.object .js "> </ script >
21- < script src ="test.xhr .js "> </ script >
20+ < script src ="../utils .js "> </ script >
21+ < script src ="../autocomplete .js "> </ script >
22+ < script src ="autocomplete.test .js "> </ script >
2223 < script class ="mocha-exec ">
2324 mocha . run ( )
2425 </ script >
You can’t perform that action at this time.
0 commit comments