(value, expectedValid)
| 346 | } |
| 347 | |
| 348 | function assertValidation(value, expectedValid) { |
| 349 | const step = validationStep(); |
| 350 | assert.ok(step, "action.yml must add a validation step that references review_task_timeout"); |
| 351 | const fixture = makeFixture(); |
| 352 | try { |
| 353 | const result = runStep(step, inputValues({ review_task_timeout: value }), fixture); |
| 354 | if (expectedValid) { |
| 355 | assert.strictEqual(result.status, 0, `review_task_timeout=${JSON.stringify(value)} should be accepted; ${resultDescription(result)}`); |
| 356 | } else { |
| 357 | assert.notStrictEqual(result.status, 0, `review_task_timeout=${JSON.stringify(value)} should be rejected; ${resultDescription(result)}`); |
| 358 | } |
| 359 | } finally { |
| 360 | removeFixture(fixture); |
| 361 | } |
| 362 | } |
| 363 | |
| 364 | function testReviewTaskTimeoutInputNameAndScope() { |
| 365 | assert.ok(INPUTS.review_task_timeout, "action.yml must define the review_task_timeout input"); |
no test coverage detected