Ghost
New
pippinmole
/
ghost
public
forked from
ghost/ghost
Source code of Ghost - On Ghost
Star
0
Fork
0
Code
Issues
0
Pull requests
0
main
76
branches
Go to file
t
Code
ghost
apps
api
test
unit-setup.ts
api: migrate the test database once before the unit run, so no integration spec depends on another migrating first
e91ab57
3 days ago
7 lines · 306 B
1
import
{
migrateTestDatabase
}
from
'
./migrate.js
'
;
2
3
//
Integration specs share TEST_DATABASE_URL; migrating up front means none depends on another spec having migrated first.
4
export
default
async
function
5
const
url
=
6
if
(
url
)
await
7
}
setup
()
{
process
.
env
.
TEST_DATABASE_URL
;
migrateTestDatabase
(
url
)
;