Skip to content

Commit

Permalink
Add sqlite details to unit testing guide (strapi#7603)
Browse files Browse the repository at this point in the history
Signed-off-by: Garrett Fritz <garrettfritz@garretts-mbp.home>
  • Loading branch information
jasonprado authored and Garrett Fritz committed Sep 7, 2020
1 parent 934c461 commit f6b877e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/v3.x/guides/unit-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ Please note that this guide will not work if you are on Windows using the SQLite

`Supertest` allows you to test all the `api` routes as they were instances of [http.Server](https://nodejs.org/api/http.html#http_class_http_server)

`sqlite3` is used to create an on-disk database that is created and deleted between tests.

:::: tabs

::: tab yarn
`yarn add jest supertest`
`yarn add --dev jest supertest sqlite3`
:::

::: tab npm
`npm install jest supertest`
`npm install jest supertest sqlite3 --save-dev`
:::
::::

Expand Down Expand Up @@ -89,7 +91,7 @@ The whole file will look like this:
"useNullAsDefault": true,
"pool": {
"min": 0,
"max": 15
"max": 1
}
}
}
Expand Down

0 comments on commit f6b877e

Please sign in to comment.