Skip to content

Commit

Permalink
Fix tests for newer AVA version
Browse files Browse the repository at this point in the history
Which defaults `process.cwd()` to the package root.
  • Loading branch information
sindresorhus committed Nov 4, 2017
1 parent ed81508 commit 8aac403
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions test/test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
import path from 'path';
import test from 'ava';
import m from '../';
import m from '..';

const pkg = path.join(__dirname, '..');
const otherName = path.join(__dirname, 'pkg.json');
Expand All @@ -19,12 +19,8 @@ test('async - directory', async t => {
});

test.serial('async - default filepath', async t => {
process.chdir('..');

const x = await m();
t.is(x.name, 'read-pkg');

process.chdir('test');
});

test('sync', t => {
Expand All @@ -40,10 +36,6 @@ test('sync - directory', t => {
});

test.serial('sync - default filepath', t => {
process.chdir('..');

const x = m.sync();
t.is(x.name, 'read-pkg');

process.chdir('test');
});

0 comments on commit 8aac403

Please sign in to comment.