UNPKG

@data-fair/sd-express

Version:

Middleware and router helpers to write expressjs applications that depend on simple-directory for authentication.

20 lines (15 loc) 353 B
const test = require('ava') const sdClient = require('./index') test('required parameters', t => { try { sdClient({}) t.fail() } catch (err) { t.is(err.code, 'ERR_ASSERTION') } }) test('proper exports', t => { const cl = sdClient({ directoryUrl: 'http://directory' }) t.truthy(cl.auth) }) // TODO: well everything basically :)