Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioricali committed Aug 13, 2017
1 parent 7c249c7 commit b455446
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions test/katch.js
Expand Up @@ -339,6 +339,24 @@ describe('katch', () => {
}
});

it('addLevel level bad level type', done => {
try {
katch.addLevel(123);
} catch (e) {
console.log(e);
done();
}
});

it('addLevel level bad code type', done => {
try {
katch.addLevel('info321', '34');
} catch (e) {
console.log(e);
done();
}
});

it('addLevel level not allowed', done => {
try {
katch.addLevel('wrap', 123);
Expand Down Expand Up @@ -381,6 +399,16 @@ describe('katch', () => {
}
});

it('removeLevel level system 2', done => {
try {
katch.removeLevel('ERROR');
} catch (e) {
console.log(e);
if(e.message === 'cannot remove a default level')
done();
}
});

it('removeLevel unknown level', done => {
try {
katch.removeLevel('level_x');
Expand Down

0 comments on commit b455446

Please sign in to comment.