MCPcopy Create free account
hub / github.com/nodejs/node / subsetTestByKey

Function subsetTestByKey

test/fixtures/wpt/common/subset-tests-by-key.js:68–80  ·  view source on GitHub ↗

* Only test a subset of tests with `?include=Foo` or `?exclude=Foo` in the URL. * Can be used together with ` ` * Sample usage: * for (const test of tests) { * subsetTestByKey("Foo", async_test, test.fn, test.name); * }

(key, testFunc, ...args)

Source from the content-addressed store, hash-verified

66 * }
67 */
68 function subsetTestByKey(key, testFunc, ...args) {
69 if (collectKeys) {
70 if (collectCounts && key in keys) {
71 keys[key]++;
72 } else {
73 keys[key] = 1;
74 }
75 }
76 if (shouldRunSubTest(key)) {
77 return testFunc(...args);
78 }
79 return null;
80 }
81 self.shouldRunSubTest = shouldRunSubTest;
82 self.subsetTestByKey = subsetTestByKey;
83})();

Callers 5

idlharness.jsFile · 0.85
runURLSettersTestsFunction · 0.85
runURLTestsFunction · 0.85
runURLSettersTestsFunction · 0.85
runURLTestsFunction · 0.85

Calls 2

testFuncFunction · 0.85
shouldRunSubTestFunction · 0.70

Tested by

no test coverage detected