diff --git a/test/endpoints.js b/test/endpoints.js new file mode 100644 index 0000000..29caa7a --- /dev/null +++ b/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) +}) diff --git a/test/unit.js b/test/unit.js index a9af3d1..1ea807d 100644 --- a/test/unit.js +++ b/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) -})