Skip to content

Commit d3025e8

Browse files
committed
Add README
1 parent 9bd6210 commit d3025e8

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Running the Tests
2+
3+
Run all tests: `spago test`
4+
5+
### API Test Config
6+
7+
The API tests require a config file `tests/config.json` with the following format:
8+
9+
```json
10+
{
11+
"startServer": {
12+
"executable": "", // Server executable to spawn before each test
13+
"arguments": [] // arguments passed to the executable
14+
},
15+
"workingDir": "", // Working directory for cleanup and startServer commands
16+
"apiUrl": "", // Root URL of the api, e.g. http://localhost:3000/api
17+
"cleanup": "", // Cleanup command to run after each test
18+
"envVars": [ // Env vars for the startServer and cleanup commands
19+
{ "key": "", "value": "" }
20+
]
21+
}
22+
```
23+
24+
The `cleanup` command should clear out the database.

0 commit comments

Comments
 (0)