mirror of
https://github.com/all-contributors/cli.git
synced 2025-01-10 05:56:29 +00:00
1305a7cd92
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
13 lines
467 B
JavaScript
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);
|
|
});
|