From 8d88ff4ef065d72c6de4953d76240252cadc3cd8 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Thu, 22 Dec 2016 13:17:44 +0700 Subject: [PATCH] Add data fixture --- test/endpoints.js | 13 +++---------- test/fixtures/data.js | 10 ++++++++++ 2 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 test/fixtures/data.js 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' + ] +}