<commit_before>'use strict';
const test = require('ava');
const config = require('./config');
const schema = require('./lib/schema');
const manifest = require('./lib/manifest');

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'), 'number', 'port OK');
  t.is(typeof config.get('db.user'), 'string', 'user OK');
  t.is(typeof config.get('db.password'), 'string', 'password OK');
});

test('GET /schema/latest', async t => {
  const latest = await schema.fetch();
  t.is(typeof latest, 'object');
});

test('GET /account/self/file/sync', async t => {
  const listing = await manifest.fetch();
  t.is(typeof listing, 'object');
});<commit_msg>Updated tests<commit_after>'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');
    });
});
{'fraction_non_alphanumeric': 0.23516361619523019, 'fraction_numerical': 0.0, 'mean_word_length': 4.690851735015773, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4677013', 'n_tokens_mistral': 594, 'n_tokens_neox': 591, 'n_words': 147}