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

Function registerTest

deps/v8/test/test262/harness-adapt.js:49–77  ·  view source on GitHub ↗
(test)

Source from the content-addressed store, hash-verified

47 }
48
49 function registerTest(test) {
50 if (!(test.precondition && !test.precondition())) {
51 var error;
52 try {
53 var res = test.test.call($this);
54 } catch(e) {
55 res = 'fail';
56 error = e;
57 }
58 var retVal = /^s/i.test(test.id)
59 ? (res === true || typeof res == 'undefined' ? 'pass' : 'fail')
60 : (res === true ? 'pass' : 'fail');
61
62 if (retVal != 'pass') {
63 var precondition = (test.precondition !== undefined)
64 ? test.precondition.toString()
65 : '';
66
67 throw new Test262Error(
68 test.id,
69 test.path,
70 test.description,
71 test.test.toString(),
72 precondition,
73 retVal,
74 error);
75 }
76 }
77 }
78
79 return {
80 registerTest: registerTest

Callers

nothing calls this directly

Calls 3

callMethod · 0.45
testMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…