mirror of
https://github.com/strapi/strapi.git
synced 2025-11-25 14:41:15 +00:00
Add sqlite details to unit testing guide (#7603)
This commit is contained in:
parent
d2ef1d4b8c
commit
69706d7587
@ -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)
|
`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
|
:::: tabs
|
||||||
|
|
||||||
::: tab yarn
|
::: tab yarn
|
||||||
`yarn add jest supertest`
|
`yarn add --dev jest supertest sqlite3`
|
||||||
:::
|
:::
|
||||||
|
|
||||||
::: tab npm
|
::: tab npm
|
||||||
`npm install jest supertest`
|
`npm install jest supertest sqlite3 --save-dev`
|
||||||
:::
|
:::
|
||||||
::::
|
::::
|
||||||
|
|
||||||
@ -89,7 +91,7 @@ The whole file will look like this:
|
|||||||
"useNullAsDefault": true,
|
"useNullAsDefault": true,
|
||||||
"pool": {
|
"pool": {
|
||||||
"min": 0,
|
"min": 0,
|
||||||
"max": 15
|
"max": 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user