Skip to content

Commit 8aac403

Browse files
committed
Fix tests for newer AVA version
Which defaults `process.cwd()` to the package root.
1 parent ed81508 commit 8aac403

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

test/test.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
import path from 'path';
33
import test from 'ava';
4-
import m from '../';
4+
import m from '..';
55

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

2121
test.serial('async - default filepath', async t => {
22-
process.chdir('..');
23-
2422
const x = await m();
2523
t.is(x.name, 'read-pkg');
26-
27-
process.chdir('test');
2824
});
2925

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

4238
test.serial('sync - default filepath', t => {
43-
process.chdir('..');
44-
4539
const x = m.sync();
4640
t.is(x.name, 'read-pkg');
47-
48-
process.chdir('test');
4941
});

0 commit comments

Comments
 (0)