Skip to content

Commit 9b5fb8a

Browse files
committed
test: add node-report tests
1 parent dacd0d9 commit 9b5fb8a

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

test/common/node-report.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const assert = require('assert');
2+
const reportCommon = require('../../../deps/node-report/test/common');
3+
4+
exports.findReports = reportCommon.findReports;
5+
exports.validate = (report, options) => {
6+
t = {
7+
test: (name, f) => f(),
8+
}
9+
reportCommon.validate(t, report, options);
10+
}
11+
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const common = require('../common');
2+
const assert = require('assert');
3+
const reportCommon = require('../common/node-report');
4+
5+
if (common.isWindows)
6+
common.skip('signals not supported on Windows');
7+
process.kill(process.pid, 'SIGUSR2');
8+
const report = reportCommon.findReports(process.pid);
9+
assertStrictEquals(report.length, 1);
10+

0 commit comments

Comments
 (0)