()
| 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; |
no outgoing calls
no test coverage detected