(value, expectedValid)
| 359 | } |
| 360 | |
| 361 | function assertValidation(value, expectedValid) { |
| 362 | const step = validationStep(); |
| 363 | assert.ok(step, "action.yml must add a validation step that references review_task_timeout"); |
| 364 | const fixture = makeFixture(); |
| 365 | try { |
| 366 | const result = runStep(step, inputValues({ review_task_timeout: value }), fixture); |
| 367 | if (expectedValid) { |
| 368 | assert.strictEqual(result.status, 0, `review_task_timeout=${JSON.stringify(value)} should be accepted; ${resultDescription(result)}`); |
| 369 | } else { |
| 370 | assert.notStrictEqual(result.status, 0, `review_task_timeout=${JSON.stringify(value)} should be rejected; ${resultDescription(result)}`); |
| 371 | } |
| 372 | } finally { |
| 373 | removeFixture(fixture); |
| 374 | } |
| 375 | } |
| 376 | |
| 377 | function prRefsStep() { |
| 378 | const step = stepNamed("Resolve PR refs"); |
no test coverage detected