MCPcopy Create free account
hub / github.com/nodejs/node / #cancel

Method #cancel

lib/internal/test_runner/test.js:1064–1077  ·  view source on GitHub ↗
(error)

Source from the content-addressed store, hash-verified

1062 };
1063
1064 #cancel(error) {
1065 if (this.endTime !== null || this.error !== null) {
1066 return;
1067 }
1068
1069 this.fail(error ||
1070 new ERR_TEST_FAILURE(
1071 'test did not finish before its parent and was cancelled',
1072 kCancelledByParent,
1073 ),
1074 );
1075 this.cancelled = true;
1076 this.abortController.abort();
1077 }
1078
1079 computeInheritedHooks() {
1080 if (this.parent.hooks.beforeEach.length > 0) {

Callers 3

TestClass · 0.95
runMethod · 0.95
postRunMethod · 0.45

Calls 2

failMethod · 0.95
abortMethod · 0.65

Tested by

no test coverage detected