all-contributors-cli/lib/util/config-file.test.js
Jeroen Engels 1305a7cd92 fix: Bump inquirer to v3 and promisify everything (#34)
BREAKING CHANGE: Drop support for Node < v4. This uses native Promises available from Node v4.

* fix: Bump inquirer to v3.0.1. Fixes #33 to improve Windows support.

* refactor: Promisify everything as inquirer uses Promises from 1.0.0 onwards
2017-02-15 22:25:32 +01:00

13 lines
467 B
JavaScript

import test from 'ava';
import configFile from './config-file.js';
const absentFile = './abc';
const expected = 'Configuration file not found: ' + absentFile;
test('Reading an absent configuration file throws a helpful error', t => {
t.throws(() => configFile.readConfig(absentFile), expected);
});
test('Writing contributors in an absent configuration file throws a helpful error', t => {
t.throws(configFile.writeContributors(absentFile, []), expected);
});