diff --git a/test/endpoints.js b/test/endpoints.js index 29caa7a..53ddc35 100644 --- a/test/endpoints.js +++ b/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 => { diff --git a/test/fixtures/data.js b/test/fixtures/data.js new file mode 100644 index 0000000..d5aa328 --- /dev/null +++ b/test/fixtures/data.js @@ -0,0 +1,10 @@ +module.exports = { + defaultEndpoints: [ + 'summary', + 'details', + 'bandwidth', + 'weights', + 'clients', + 'uptime' + ] +}