@return {boolean}
()
| 234 | |
| 235 | /** @return {boolean} */ |
| 236 | hasBDDAncestor() { |
| 237 | let hasBDD = false |
| 238 | let processingStep |
| 239 | processingStep = this |
| 240 | |
| 241 | while (processingStep.metaStep) { |
| 242 | if (processingStep.metaStep.actor?.match(/^(Given|When|Then|And|But)/)) { |
| 243 | hasBDD = true |
| 244 | break |
| 245 | } else { |
| 246 | processingStep = processingStep.metaStep |
| 247 | } |
| 248 | } |
| 249 | return hasBDD |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | export default Step |