-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors_test.js
35 lines (29 loc) · 932 Bytes
/
errors_test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const unitJS = require('unit.js')
const {
ErrArguments,
ErrToFileNodeNotFound,
ErrFileNodeExists,
ErrFileNodeNotFound,
ErrSubsNodeNotFound,
ErrFileExists
} = require('./errors')
describe('Errors Tests', () => {
it('Arguments Error', () => {
unitJS.assert.equal('arguments error', ErrArguments.message)
})
it('ToFileNodeNotFound Error', () => {
unitJS.assert.equal('to FileNode not found', ErrToFileNodeNotFound.message)
})
it('FileNodeExists Error', () => {
unitJS.assert.equal('FileNode already exists', ErrFileNodeExists.message)
})
it('FileNodeNotFount Error', () => {
unitJS.assert.equal('FileNode not found', ErrFileNodeNotFound.message)
})
it('SubsNodeNotFount Error', () => {
unitJS.assert.equal('subs nodes not found', ErrSubsNodeNotFound.message)
})
it('FileExists Error', () => {
unitJS.assert.equal('this file already exists', ErrFileExists.message)
})
})