Browse Source

Add data fixture

pull/15/head
Luke Childs 8 years ago
parent
commit
8d88ff4ef0
  1. 13
      test/endpoints.js
  2. 10
      test/fixtures/data.js

13
test/endpoints.js

@ -1,18 +1,11 @@
import test from 'ava'
import data from './fixtures/data'
import Onionoo from '../'
test('Onionoo instance contains expected endpoints', t => {
test('Onionoo instance contains default endpoints', t => {
const onionoo = new Onionoo()
const expectedEndpoints = [
'summary',
'details',
'bandwidth',
'weights',
'clients',
'uptime'
]
t.deepEqual(Object.keys(onionoo), expectedEndpoints)
t.deepEqual(Object.keys(onionoo), data.defaultEndpoints)
})
test('Can pass in custom endpoint array', t => {

10
test/fixtures/data.js

@ -0,0 +1,10 @@
module.exports = {
defaultEndpoints: [
'summary',
'details',
'bandwidth',
'weights',
'clients',
'uptime'
]
}
Loading…
Cancel
Save