Skip to content

Commit

Permalink
feat(readme): add documentation on new metorikkuTester feature for cs…
Browse files Browse the repository at this point in the history
…v output mocks
  • Loading branch information
doronporat committed Dec 19, 2019
1 parent fcbe889 commit 941967c
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,29 @@ And the corresponding `mocks/table_1.jsonl`:
{ "id": 1, "name": "test3" }
```

Note that it is also possible to use csv mocks for the Expected output. In this case use the `testsFiles` option instead of `tests` like this -

```yaml
metric: "/path/to/metric"
mocks:
- name: table_1
path: mocks/table_1.jsonl
testsFiles:
- name: expected
path: "/path/to/expected.csv"
keys:
df2:
- id
- name
```

while the csv file under "/path/to/expected.csv" will look like this -
```csv
id,name
200,test
300,test2
```

The Keys section allows the user to define the unique columns of every DataFrame's expected results -
every expected row result should have a unique combination for the values of the key columns.
This part is optional and can be used to define only part of the expected DataFrames -
Expand Down

0 comments on commit 941967c

Please sign in to comment.