Browse Source

Split endpoint tests out into seperate file

pull/15/head
Luke Childs 8 years ago
parent
commit
4689b0882a
  1. 26
      test/endpoints.js
  2. 24
      test/unit.js

26
test/endpoints.js

@ -0,0 +1,26 @@
import test from 'ava'
import Onionoo from '../'
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)
})
test('Can pass in custom endpoint array', t => {
const endpoints = [
'foo',
'bar'
]
const onionoo = new Onionoo({ endpoints })
t.deepEqual(Object.keys(onionoo), endpoints)
})

24
test/unit.js

@ -15,27 +15,3 @@ test('Onionoo instance is an object', t => {
t.is(typeof 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)
})
test('Can pass in custom endpoint array', t => {
const endpoints = [
'foo',
'bar'
]
const onionoo = new Onionoo({ endpoints })
t.deepEqual(Object.keys(onionoo), endpoints)
})

Loading…
Cancel
Save