diff --git a/test/common.js b/test/common.js new file mode 100644 index 00000000..0db48df3 --- /dev/null +++ b/test/common.js @@ -0,0 +1,15 @@ +'use strict' + +const test = require('tape') + +const createClient = require('..') +const vbbProfile = require('../p/vbb') + +// todo: use a mock profile +const client = createClient(vbbProfile, 'public-transport/hafas-client:test') + +test('exposes the profile', (t) => { + t.ok(client.profile) + t.equal(client.profile.endpoint, vbbProfile.endpoint) + t.end() +}) diff --git a/test/index.js b/test/index.js index 35b20492..687c35a3 100644 --- a/test/index.js +++ b/test/index.js @@ -1,5 +1,6 @@ 'use strict' +require('./common') require('./db') require('./vbb') require('./bvg')