gherkin2markdown

command module
v0.0.0-...-48d40a3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 10 Imported by: 0

README

gherkin2markdown

GitHub Action Codecov Go Report Card License

A command to convert Gherkin files into Markdown.

Installation

go install github.com/raviqqe/gherkin2markdown@latest

Usage

gherkin2markdown <file>

or

gherkin2markdown <srcdir> <destdir>

Example

Given a file named math.feature with:

Feature: Python
  Scenario: Hello, world!
    Given a file named "main.py" with:
    """python
    print("Hello, world!")
    """
    When I successfully run `python3 main.py`
    Then the stdout should contain exactly "Hello, world!"

  Scenario Outline: Add numbers
    Given a file named "main.py" with:
    """python
    print(<x> + <y>)
    """
    When I successfully run `python3 main.py`
    Then the stdout should contain exactly "<z>"

    Examples:
      | x | y | z |
      | 1 | 2 | 3 |
      | 4 | 5 | 9 |

When I successfully run gherkin2markdown math.feature

Then the stdout should contain exactly:

# Python

## Hello, world!

_Given_ a file named "main.py" with:

```python
print("Hello, world!")
```

_When_ I successfully run `python3 main.py`

_Then_ the stdout should contain exactly "Hello, world!".

## Add numbers

_Given_ a file named "main.py" with:

```python
print(<x> + <y>)
```

_When_ I successfully run `python3 main.py`

_Then_ the stdout should contain exactly "<z>".

### Examples

| x   | y   | z   |
| --- | --- | --- |
| 1   | 2   | 3   |
| 4   | 5   | 9   |

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL