Skip to content

Commit

Permalink
Fix the package
Browse files Browse the repository at this point in the history
Fixes #113
  • Loading branch information
sindresorhus committed Jul 3, 2020
1 parent a4107f0 commit daa002c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import clearModule = require('clear-module');
import pEvent = require('p-event');
import delay = require('delay');
import anyTest, {TestInterface} from 'ava';
import readPkgUp = require('read-pkg-up');
import Conf, {Schema} from '../source';
import packageJson = require('../package.json');

const test = anyTest as TestInterface<{
config: Conf;
Expand Down Expand Up @@ -968,7 +968,7 @@ test('migrations - should cleanup migrations with non-numeric values', t => {
t.is(conf.get('heart'), '❤');
});

test('migrations - should infer the applicationVersion from the package.json when it isn\'t specified', t => {
test('migrations - should infer the applicationVersion from the package.json when it isn\'t specified', async t => {
const cwd = tempy.directory();

const conf = new Conf({
Expand All @@ -980,6 +980,8 @@ test('migrations - should infer the applicationVersion from the package.json whe
});

t.false(conf.has('foo'));

const {packageJson} = (await readPkgUp())!;
t.is(conf.get('__internal__.migrations.version'), packageJson.version);
});

Expand Down

0 comments on commit daa002c

Please sign in to comment.