Skip to content

Commit

Permalink
Add Talkback to Vitest suite
Browse files Browse the repository at this point in the history
This will allow for capturing realistic test fixtures for API responses from external services and set tests to consume those in place of making live calls.
  • Loading branch information
ThorntonMatthewD committed Oct 7, 2023
1 parent 7da7dfc commit 94e9070
Show file tree
Hide file tree
Showing 15 changed files with 14,609 additions and 27 deletions.
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Talkback Tapes
*.json5

// Ignore bundle files
dist/*
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ npm run build
npm run test:unit:dev
```

**Reset Cached API Responses (Called Tapes) Used by Vitest**
This project utilizes the [talkback](https://github.com/ijpiantanida/talkback) package to save responses received from external dependencies into fixtures (called tapes) that can be used in subsequent set suite executions.

If the upstream data source's response schema is altered you can run the following command to "freshen things up" and overwrite any previously recorded responses:

```sh
OVERWRITE_TAPES=1 npm run test:unit:dev
```

### Run End-to-End Tests with [Cypress](https://www.cypress.io/)

```sh
Expand Down
Loading

0 comments on commit 94e9070

Please sign in to comment.