Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 1.2 KB

markdown_table.md

File metadata and controls

30 lines (25 loc) · 1.2 KB

Markdown Tables

Another way to test a variety of inputs is to use a MarkdownTable. This works particularly well when you want to try the same set of inputs against multiple functions. Here's an example:

inputs = ["verify json", "verify all", "verify parameters", "verify as json"]
table = MarkdownTable.with_headers(
    "Input", "Camel Case", "Snake Case", "Kebab Case"
)
table.add_rows_for_inputs(inputs, to_camel_case, to_snake_case, to_kebab_case)
verify(table)

snippet source | anchor

which will produce:

Input Camel Case Snake Case Kebab Case
verify json verifyJson verify_json verify-json
verify all verifyAll verify_all verify-all
verify parameters verifyParameters verify_parameters verify-parameters
verify as json verifyAsJson verify_as_json verify-as-json