Use standard and prettier (#10)
* switch from custom eslint config to standard + prettier * fix new standard eslint violations * add editorconfig file * auto-fix all other violations * update lint yarn script * remove jshint comment
This commit is contained in:
@ -2,10 +2,10 @@ var errors = require('../../../src/lib/errors');
|
||||
var expect = require('expect.js');
|
||||
var _ = require('lodash');
|
||||
|
||||
_.each(errors, function (CustomError, name) {
|
||||
_.each(errors, function(CustomError, name) {
|
||||
if (name.charAt(0) !== '_') {
|
||||
describe(name, function () {
|
||||
it('extend the ErrorAbstract and Error classes', function () {
|
||||
describe(name, function() {
|
||||
it('extend the ErrorAbstract and Error classes', function() {
|
||||
var err = new CustomError();
|
||||
expect(err).to.be.an(Error);
|
||||
expect(err).to.be.an(errors._Abstract);
|
||||
@ -14,8 +14,8 @@ _.each(errors, function (CustomError, name) {
|
||||
}
|
||||
});
|
||||
|
||||
describe('Error Abstract', function () {
|
||||
it('provides a stack property in the browser', function () {
|
||||
describe('Error Abstract', function() {
|
||||
it('provides a stack property in the browser', function() {
|
||||
var isBrowser = process.browser;
|
||||
process.browser = true;
|
||||
var err = new errors._Abstract();
|
||||
@ -25,8 +25,8 @@ describe('Error Abstract', function () {
|
||||
});
|
||||
});
|
||||
|
||||
describe('StatusCodeError', function () {
|
||||
it('exposes status code as a number', function () {
|
||||
describe('StatusCodeError', function() {
|
||||
it('exposes status code as a number', function() {
|
||||
var err = new errors['404']();
|
||||
expect(err.status).to.be(404);
|
||||
expect(err.status).to.not.be('404');
|
||||
|
||||
Reference in New Issue
Block a user