First commit
This commit is contained in:
24
node_modules/@ldapjs/protocol/index.test.js
generated
vendored
Normal file
24
node_modules/@ldapjs/protocol/index.test.js
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
'use strict'
|
||||
|
||||
const tap = require('tap')
|
||||
const protocol = require('./')
|
||||
|
||||
tap.test('exports expected object', async t => {
|
||||
t.equal(Object.isFrozen(protocol), true);
|
||||
['core', 'operations', 'resultCodes', 'search'].forEach(component => {
|
||||
t.ok(protocol[component])
|
||||
t.equal(Object.isFrozen(protocol[component]), true)
|
||||
})
|
||||
})
|
||||
|
||||
tap.test('resultCodeToName', t => {
|
||||
t.test('returns undefined for not found', async t => {
|
||||
t.equal(protocol.resultCodeToName(-1), undefined)
|
||||
})
|
||||
|
||||
t.test('returns correct name', async t => {
|
||||
t.equal(protocol.resultCodeToName(32), 'NO_SUCH_OBJECT')
|
||||
})
|
||||
|
||||
t.end()
|
||||
})
|
||||
Reference in New Issue
Block a user