|
1 | 1 | const test = require('ava') |
2 | 2 | const exec = require('./_exec') |
3 | | -test('exec', (t) => { |
4 | | - exec('./test/fixtures/test.js') |
| 3 | +test('exec', async (t) => { |
| 4 | + await exec('./test/fixtures/test.js') |
5 | 5 | t.pass() |
6 | 6 | }) |
7 | 7 |
|
8 | | -test('relative path', (t) => { |
9 | | - exec('test/fixtures/test.js') |
| 8 | +test('relative path', async (t) => { |
| 9 | + await exec('test/fixtures/test.js') |
10 | 10 | t.pass() |
11 | 11 | }) |
12 | 12 |
|
13 | | -test('json & multi params', (t) => { |
14 | | - t.is(exec('./test/fixtures/test.json repository type'), 'git') |
| 13 | +test('json & multi params', async (t) => { |
| 14 | + t.is(await exec('./test/fixtures/test.json repository type'), 'git') |
15 | 15 | t.pass() |
16 | 16 | }) |
17 | 17 |
|
18 | | -test('test2', (t) => { |
19 | | - t.is(exec('./test/fixtures/test2.js'), `{ a: [Function], |
| 18 | +test('test2', async (t) => { |
| 19 | + t.is(await exec('./test/fixtures/test2.js'), `{ a: [Function], |
20 | 20 | b: [Function], |
21 | 21 | c: [Function], |
22 | 22 | d: [Function], |
23 | 23 | e: [Function] }`) |
24 | 24 | }) |
25 | 25 |
|
26 | | -test('test2 with second param', (t) => { |
27 | | - exec('./test/fixtures/test2.js a') |
| 26 | +test('test2 with second param', async (t) => { |
| 27 | + await exec('./test/fixtures/test2.js a') |
28 | 28 | }) |
29 | 29 |
|
30 | | -test('deep get', t => { |
31 | | - t.is(exec('./test/fixtures/deep.js b d'), 'delay deep') |
| 30 | +test('deep get', async (t) => { |
| 31 | + t.is(await exec('./test/fixtures/deep.js b d'), 'delay deep') |
32 | 32 | t.pass() |
33 | 33 | }) |
0 commit comments