(result)
| 5 | const assert = require('assert'); |
| 6 | |
| 7 | function validateResult(result) { |
| 8 | assert.notStrictEqual(result, null); |
| 9 | |
| 10 | assert.ok(Number.isFinite(result.user)); |
| 11 | assert.ok(Number.isFinite(result.system)); |
| 12 | |
| 13 | assert.ok(result.user >= 0); |
| 14 | assert.ok(result.system >= 0); |
| 15 | } |
| 16 | |
| 17 | // Test that process.threadCpuUsage() works on the main thread |
| 18 | // The if check and the else branch should be removed once SmartOS support is fixed in |
no test coverage detected
searching dependent graphs…