Skip to content

Commit

Permalink
test: add readme with options test case
Browse files Browse the repository at this point in the history
  • Loading branch information
sheerlox committed Nov 28, 2023
1 parent 494dd38 commit 76cff36
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions tests/fixtures/readme/readme-with-options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Hello World

## Installation

```elixir
def deps do
[{:hello_world, "~> {{VERSION}}", only: :dev, runtime: false}]
end
```
2 changes: 1 addition & 1 deletion tests/helpers/create-test-project.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { temporaryDirectory } from "tempy";
* @param {boolean | null} [asAttribute] (mix.exs) whether to set the version as a module attribute
* @param {"trap" | "complex-name" | null} [mixSuffix] (mix.exs) optional mix fixture file suffix
* @param {boolean | null} [asGitTag] (README.md) whether to set the version as a git tag
* @param {"empty" | "no-operator" | null} [gitOverride] (README.md) override for the filename suffix
* @param {"empty" | "no-operator" | "with-options" | null} [gitOverride] (README.md) override for the filename suffix
* @returns {Project}
*/
export function createTestProject(
Expand Down
2 changes: 1 addition & 1 deletion tests/prepare.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ describe("prepare step", () => {
{ asGitTag: false },
{ asGitTag: true },
{ override: "no-operator" },
{ override: "with-options" },
];

expect.assertions(configs.length * 3);
Expand All @@ -185,7 +186,6 @@ describe("prepare step", () => {
);

const readmeContent = fs.readFileSync(path, { encoding: "utf-8" });
console.debug(readmeContent);
const { readmeVersionRegex, readmeVersionRegexesArray } =
createReadmeVersionRequirementRegexs("hello_world");

Expand Down

0 comments on commit 76cff36

Please sign in to comment.