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

Method pass

lib/internal/test_runner/test.js:1157–1185  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1155 }
1156
1157 pass() {
1158 if (this.error == null && this.expectFailure && !this.skipped) {
1159 this.passed = false;
1160 this.error = new ERR_TEST_FAILURE(
1161 'test was expected to fail but passed',
1162 kExpectedFailure,
1163 );
1164 return;
1165 }
1166 if (this.error !== null) {
1167 return;
1168 }
1169
1170 if (this.skipped || this.isTodo) {
1171 this.passed = true;
1172 return;
1173 }
1174
1175 if (this.expectFailure) {
1176 this.passed = false;
1177 this.error = new ERR_TEST_FAILURE(
1178 'Test passed but was expected to fail',
1179 kTestCodeFailure,
1180 );
1181 return;
1182 }
1183
1184 this.passed = true;
1185 }
1186
1187 skip(message) {
1188 this.skipped = true;

Callers 9

filteredRunMethod · 0.95
runMethod · 0.95
runMethod · 0.80
trust-cmd.jsFile · 0.80
npm.jsFile · 0.80
display.jsFile · 0.80
approve-scripts.jsFile · 0.80
completion.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected