MCPcopy Index your code
hub / github.com/nodejs/node / validate

Function validate

test/parallel/test-worker-cpu-usage.js:9–15  ·  view source on GitHub ↗
(result)

Source from the content-addressed store, hash-verified

7} = require('worker_threads');
8
9function validate(result) {
10 assert.ok(typeof result == 'object' && result !== null);
11 assert.ok(result.user >= 0);
12 assert.ok(result.system >= 0);
13 assert.ok(Number.isFinite(result.user));
14 assert.ok(Number.isFinite(result.system));
15}
16
17function check(worker) {
18 [

Callers 1

Calls 1

okMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…