From f67990f70abb5843c2951628a11ee704e06ba46b Mon Sep 17 00:00:00 2001 From: Laura Armitage Date: Thu, 15 Feb 2024 11:41:14 +0000 Subject: [PATCH] GH-240 all tests fixed --- __tests__/action-docs-workflow.test.ts | 56 ++++++++++--------- .../action_docs_workflow_readme.output | 2 +- .../workflow/two_workflows_readme.input | 2 +- .../workflow/two_workflows_readme.output | 8 +-- 4 files changed, 37 insertions(+), 31 deletions(-) diff --git a/__tests__/action-docs-workflow.test.ts b/__tests__/action-docs-workflow.test.ts index 0f29a79d..13d5d264 100644 --- a/__tests__/action-docs-workflow.test.ts +++ b/__tests__/action-docs-workflow.test.ts @@ -81,31 +81,37 @@ describe("Test update readme ", () => { ); }); - // test("Readme (inputs) for action_docs_workflow", async () => { - // await testReadme({ - // actionFile: path.join(fixtureDir, "action_docs_workflow.yml"), - // originalReadme: path.join(fixtureDir, "action_docs_workflow_readme.input"), - // fixtureReadme: path.join(fixtureDir, "action_docs_workflow_readme.output"), - // }); - // }); - - // test("Readme for two workflow.yml-s", async () => { - // await testReadme( - // { - // actionFile: path.join(fixtureDir, "action_docs_workflow.yml"), - // originalReadme: path.join(fixtureDir, "two_workflows_readme.input"), - // fixtureReadme: path.join(fixtureDir, "two_workflows_readme.output"), - // }, - // {}, - // false, - // ); - - // await testReadme({ - // actionFile: path.join(fixtureDir, "all_fields_workflow.yml"), - // originalReadme: path.join(fixtureDir, "two_workflows_readme.input"), - // fixtureReadme: path.join(fixtureDir, "two_workflows_readme.output"), - // }); - // }); + test("Readme (inputs) for action_docs_workflow", async () => { + await testReadme({ + actionFile: path.join(fixtureDir, "action_docs_workflow.yml"), + originalReadme: path.join( + fixtureDir, + "action_docs_workflow_readme.input", + ), + fixtureReadme: path.join( + fixtureDir, + "action_docs_workflow_readme.output", + ), + }); + }); + + test("Readme for two workflow.yml-s", async () => { + await testReadme( + { + actionFile: path.join(fixtureDir, "action_docs_workflow.yml"), + originalReadme: path.join(fixtureDir, "two_workflows_readme.input"), + fixtureReadme: path.join(fixtureDir, "two_workflows_readme.output"), + }, + {}, + false, + ); + + await testReadme({ + actionFile: path.join(fixtureDir, "all_fields_workflow.yml"), + originalReadme: path.join(fixtureDir, "two_workflows_readme.input"), + fixtureReadme: path.join(fixtureDir, "two_workflows_readme.output"), + }); + }); }); describe("Test usage format", () => { diff --git a/__tests__/fixtures/workflow/action_docs_workflow_readme.output b/__tests__/fixtures/workflow/action_docs_workflow_readme.output index 2261973f..ac9da372 100644 --- a/__tests__/fixtures/workflow/action_docs_workflow_readme.output +++ b/__tests__/fixtures/workflow/action_docs_workflow_readme.output @@ -1,5 +1,5 @@ -## Inputs +### Inputs | name | description | required | default | | --- | --- | --- | --- | diff --git a/__tests__/fixtures/workflow/two_workflows_readme.input b/__tests__/fixtures/workflow/two_workflows_readme.input index c88bc4b5..2b614aef 100644 --- a/__tests__/fixtures/workflow/two_workflows_readme.input +++ b/__tests__/fixtures/workflow/two_workflows_readme.input @@ -1,5 +1,5 @@ -## Inputs +### Inputs | name | description | required | default | | --- | --- | --- | --- | diff --git a/__tests__/fixtures/workflow/two_workflows_readme.output b/__tests__/fixtures/workflow/two_workflows_readme.output index b7e0daca..ffdf257c 100644 --- a/__tests__/fixtures/workflow/two_workflows_readme.output +++ b/__tests__/fixtures/workflow/two_workflows_readme.output @@ -1,5 +1,5 @@ -## Inputs +### Inputs | name | description | required | default | | --- | --- | --- | --- | @@ -9,11 +9,11 @@ | `lineBreaks` |

Line breaks to be used in updated readme (LF|CR|CRLF).

| `false` | `LF` | - -## Outputs + +### Outputs | name | description | | --- | --- | | `outputA` |

A description A

| | `outputB` |

A description B

| - +