diff options
| author | Tom Harley | 2018-03-27 03:50:17 +0100 |
|---|---|---|
| committer | Tom Harley | 2018-03-27 03:50:17 +0100 |
| commit | ea1ee67bdd02b2ea727c09cfef1784a61aa934f4 (patch) | |
| tree | 6bf1e8a086bd5250416307501147ee4fe942b87b /src/app.ts | |
| parent | small fix (diff) | |
| download | medicine-ea1ee67bdd02b2ea727c09cfef1784a61aa934f4.tar.gz medicine-ea1ee67bdd02b2ea727c09cfef1784a61aa934f4.zip | |
Centralise test configuration and introduce SQLite
Tests now take their configuration from a new file test-db.ts. Additionally, this configuration sets up and uses an in-memory SQLite3 database for testing, to avoid writing to disk and to prevent edits to a current database.
Diffstat (limited to 'src/app.ts')
| -rw-r--r-- | src/app.ts | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -94,8 +94,7 @@ class App { } }); if (user === null) { - next(new RequestError(404, 'user_not_found')); - return; + return next(new RequestError(404, 'user_not_found')); } else { res.locals.user = user; } @@ -142,8 +141,7 @@ class App { } }); if (fileOrNull === null) { - next(); - return; + return next(); } else { file = fileOrNull; } @@ -159,8 +157,7 @@ class App { } }); if (parentFolder === null) { - next(); - return; + return next(); } res.locals.parentFolder = parentFolder; const tFile: File | undefined = parentFolder.containedFiles.find( |
