{"size": 680, "ext": "js", "max_stars_repo_path": "test/config.js", "max_stars_repo_name": "hashtag-cloudy/really-cloudy", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "test/config.js", "max_issues_repo_name": "hashtag-cloudy/really-cloudy", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "test/config.js", "max_forks_repo_name": "hashtag-cloudy/really-cloudy", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.6060606061, "max_line_length": 87, "alphanum_fraction": 0.5926470588}
'use strict';

const Lab = require('lab');
const Code = require('code');
const Config = require('../config');
const TestSetup = require('./testsSetup');

const lab = exports.lab = Lab.script();

lab.before(TestSetup.setupConfig);

lab.after(TestSetup.breakdownConfig);

lab.experiment('Config', () => {

    lab.test('it gets config data', () => {

        Code.expect(Config.get('/')).to.be.an.object();
    });


    lab.test('it gets config meta data', () => {

        Code.expect(Config.meta('/')).to.match(/this file configures the Cloudy API/i);
    });

    lab.test('it cannot read a JSON file', () => {

        Code.expect(() => Config.test()).to.throw();
    });

});
