move defined errors into top-level errors.js file

This commit is contained in:
Riley Davis
2017-01-06 13:00:22 -07:00
parent 6a61f47ddf
commit 01db900c40
5 changed files with 58 additions and 31 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
const expect = require('chai').expect;
const errors = require('../../errors');
const Wordlist = require('../../services/wordlist');
describe('wordlist: services', () => {
@@ -67,7 +67,7 @@ describe('wordlist: services', () => {
content: 'how to do really bad things?'
}, 'content');
expect(errors).to.have.property('banned', Wordlist.ErrContainsProfanity);
expect(errors).to.have.property('banned', errors.ErrContainsProfanity);
});
it('does not match on bodies not containing bad words', () => {