Skip to content

Commit 61a4c36

Browse files
author
antoine.bluchet
committed
Fix tests
1 parent 9fcd92b commit 61a4c36

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

.appveyor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ build: off
22
version: '{build}'
33
environment:
44
matrix:
5+
- nodejs_version: '12'
6+
- nodejs_version: '10'
57
- nodejs_version: '8'
68
- nodejs_version: '6'
7-
- nodejs_version: '4'
89
platform:
910
- x86
1011
- x64

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
sudo: false
22
language: node_js
33
node_js:
4+
- '12'
5+
- '10'
46
- '8'
57
- '6'
6-
- '4'
78
os:
89
- linux
910
- osx

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"index.d.ts"
4040
],
4141
"engines": {
42-
"node": ">=0.10"
42+
"node": ">=6"
4343
},
4444
"scripts": {
4545
"start": "node ./bin/pidtree.js",
@@ -51,7 +51,7 @@
5151
"coverage": "codecov"
5252
},
5353
"devDependencies": {
54-
"ava": "*",
54+
"ava": "^1.4.1",
5555
"codecov": "*",
5656
"mockery": "^2.1.0",
5757
"np": "*",
@@ -66,6 +66,7 @@
6666
"xo": "*"
6767
},
6868
"ava": {
69+
"helpers": ["test/helpers/**"],
6970
"verbose": true
7071
},
7172
"nyc": {

test/integration.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ test('should work with a single pid', async t => {
1818
t.log(result);
1919

2020
t.true(Array.isArray(result));
21-
result.forEach((p, i) => {
22-
t.is(typeof p, 'object', i);
23-
t.is(typeof p.ppid, 'number', i);
24-
t.false(isNaN(p.ppid), i);
25-
t.is(typeof p.pid, 'number', i);
26-
t.false(isNaN(p.pid), i);
21+
result.forEach(p => {
22+
t.is(typeof p, 'object');
23+
t.is(typeof p.ppid, 'number');
24+
t.false(isNaN(p.ppid));
25+
t.is(typeof p.pid, 'number');
26+
t.false(isNaN(p.pid));
2727
});
2828

2929
result = await pidtree(-1);
3030

3131
t.true(Array.isArray(result));
32-
result.forEach((p, i) => {
33-
t.is(typeof p, 'number', i);
34-
t.false(isNaN(p), i);
32+
result.forEach(p => {
33+
t.is(typeof p, 'number');
34+
t.false(isNaN(p));
3535
});
3636
});
3737

0 commit comments

Comments
 (0)