Browse Source

Test Onionoo instance contains expected endpoints

pull/14/head
Luke Childs 8 years ago
parent
commit
a67ed45cf7
  1. 14
      test/unit.js

14
test/unit.js

@ -13,3 +13,17 @@ test('Onionoo cannot be invoked without \'new\'', t => {
test('Onionoo instance is an object', t => {
t.is(typeof new Onionoo(), 'object')
})
test('Onionoo instance contains expected endpoints', t => {
const onionoo = new Onionoo()
const expectedEndpoints = [
'summary',
'details',
'bandwidth',
'weights',
'clients',
'uptime'
]
t.deepEqual(Object.keys(onionoo), expectedEndpoints)
})

Loading…
Cancel
Save