forked from neurotech/canvas-data-warehouse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
27 lines (24 loc) · 884 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
'use strict';
const test = require('ava');
const config = require('./config');
const manifest = require('./lib/manifest');
const generate = require('./lib/schema/generate');
test('Valid config', t => {
t.is(typeof config.get('api.url'), 'string', 'url OK');
t.is(typeof config.get('api.key'), 'string', 'key OK');
t.is(typeof config.get('api.secret'), 'string', 'secret OK');
t.is(typeof config.get('db.host'), 'string', 'host OK');
t.is(typeof config.get('db.port'), 'string', 'port OK');
t.is(typeof config.get('db.user'), 'string', 'user OK');
t.is(typeof config.get('db.password'), 'string', 'password OK');
});
test('GET /account/self/file/sync', async t => {
const listing = await manifest.fetch();
t.is(typeof listing, 'object');
});
test('Generate Schema', async t => {
generate()
.then(results => {
t.is(typeof results, 'array');
});
});