test that the profile is exposed

This commit is contained in:
Jannis R 2018-10-15 17:33:11 +02:00
parent 95839372b5
commit 1a4c09ab4e
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
2 changed files with 16 additions and 0 deletions

15
test/common.js Normal file
View file

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

View file

@ -1,5 +1,6 @@
'use strict' 'use strict'
require('./common')
require('./db') require('./db')
require('./vbb') require('./vbb')
require('./bvg') require('./bvg')