Building a http server for testing easily. Based on Ynn;
npm i --save-dev karma-server
config.set( {
frameworks : [ 'server' ],
server : {
namespace : 'S',
root : 'test/server',
static : 'test/server',
modules : {
home : './home'
}
}
} )
Code in test cases:
it( 'xx', () => {
fetch( S.host );
} );