|
|
@ -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) |
|
|
|
}) |
|
|
|