mirror of
https://github.com/documentationjs/documentation.git
synced 2026-01-18 14:17:30 +00:00
21 lines
478 B
JavaScript
21 lines
478 B
JavaScript
'use strict';
|
|
|
|
var test = require('tap').test,
|
|
path = require('path'),
|
|
loadConfig = require('../../lib/load_config');
|
|
|
|
test('loadConfig', function (t) {
|
|
|
|
t.throws(function () {
|
|
loadConfig('DOES-NOT-EXIST');
|
|
});
|
|
|
|
t.deepEqual(loadConfig(path.join(__dirname, '../config_fixture/config.json')),
|
|
{ foo: 'bar' });
|
|
|
|
t.deepEqual(loadConfig(path.join(__dirname, '../config_fixture/config_comments.json')),
|
|
{ foo: 'bar' }, 'config with comments');
|
|
|
|
t.end();
|
|
});
|