Fix eslint errors

This commit is contained in:
Tankred Hase
2017-08-15 16:03:06 +08:00
parent 750cf3d897
commit e9251d5203
20 changed files with 355 additions and 347 deletions

View File

@@ -116,7 +116,7 @@ describe('Util Unit Tests', () => {
try {
util.throw(500, 'boom');
expect(true).to.be.false;
} catch(e) {
} catch (e) {
expect(e.message).to.equal('boom');
expect(e.status).to.equal(500);
expect(e.expose).to.be.true;
@@ -136,20 +136,19 @@ describe('Util Unit Tests', () => {
describe('origin', () => {
it('should work', () => {
expect(util.origin({ secure:true, host:'h', protocol:'p' })).to.exist;
expect(util.origin({secure: true, host: 'h', protocol: 'p'})).to.exist;
});
});
describe('url', () => {
it('should work with resource', () => {
let url = util.url({ host:'localhost', protocol:'http'}, '/foo');
const url = util.url({host: 'localhost', protocol: 'http'}, '/foo');
expect(url).to.equal('http://localhost/foo');
});
it('should work without resource', () => {
let url = util.url({ host:'localhost', protocol:'http'});
const url = util.url({host: 'localhost', protocol: 'http'});
expect(url).to.equal('http://localhost');
});
});
});
});