Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
fixes #2
  • Loading branch information
sindresorhus committed Jun 22, 2016
1 parent d234973 commit e72d2eb
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,17 @@ test('`configName` option', t => {
t.is(conf.get('foo'), undefined);
conf.set('foo', fixture);
t.is(conf.get('foo'), fixture);
t.is(path.basename(conf.path), configName);
t.is(path.basename(conf.path, '.json'), configName);
});

test('`projectName` option', t => {
const projectName = 'project-name-123';
const conf = new Conf({
cwd: tempfile(),
projectName
});
const projectName = 'conf-fixture-project-name';
const conf = new Conf({projectName});
t.is(conf.get('foo'), undefined);
conf.set('foo', fixture);
t.is(conf.get('foo'), fixture);
t.true(conf.path.includes(projectName));
del.sync(conf.path, {force: true});
});

test('ensure `.store` is always an object', t => {
Expand All @@ -141,7 +139,7 @@ test('instance is iterable', t => {
t.deepEqual(Array.from(t.context.conf), [['foo', fixture], ['bar', fixture]]);
});

test.only('automatic `projectName` inference', t => {
test('automatic `projectName` inference', t => {
const conf = new Conf();
conf.set('foo', fixture);
t.is(conf.get('foo'), fixture);
Expand Down

0 comments on commit e72d2eb

Please sign in to comment.