@@ -40,6 +40,7 @@ describe('server', () => {
4040 } ) ;
4141
4242 router . addAssetPath ( 'images' , 'tests/images/' ) ;
43+ router . addAssetPath ( 'js' , 'tests/js/' ) ;
4344
4445 router . listen ( 8000 ) ;
4546 } ) ;
@@ -170,7 +171,7 @@ describe('server', () => {
170171 } ) ;
171172 } ) ;
172173
173- describe ( '/images/loader.gif' , ( parameters ) => {
174+ describe ( '/images/loader.gif' , ( ) => {
174175 let route = 'images/loader.gif' ;
175176
176177 it ( 'it should return 200 status code' , ( done ) => {
@@ -197,6 +198,33 @@ describe('server', () => {
197198 } ) ;
198199 } ) ;
199200
201+ describe ( '/jspm_packages/github/capaj/systemjs-hot-reloader@0.5.7.js' , ( ) => {
202+ let route = '/jspm_packages/github/capaj/systemjs-hot-reloader@0.5.7.js' ;
203+
204+ it ( 'it should return 200 status code' , ( done ) => {
205+ http . get ( `${ SERVER_URL } /${ route } ` , ( res ) => {
206+ res . statusCode . should . equal ( 200 ) ;
207+ done ( ) ;
208+ } ) ;
209+ } ) ;
210+
211+ it ( 'it should return contents of systemjs-hot-reloader@0.5.7.js' , ( done ) => {
212+ http . get ( `${ SERVER_URL } /${ route } ` , ( res ) => {
213+ let data = '' ;
214+ res . on ( 'data' , chunk => data += chunk ) . on ( 'end' , ( ) => {
215+ fs . readFile ( `tests/js${ route } ` , ( err , data ) => {
216+ if ( err ) {
217+ throw err ;
218+ }
219+
220+ data . should . equal ( data ) ;
221+ done ( ) ;
222+ } ) ;
223+ } ) ;
224+ } ) ;
225+ } ) ;
226+ } ) ;
227+
200228 describe ( '/:test([a-z]+)' , ( ) => {
201229 let route = '/test-route' ;
202230
0 commit comments