

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Postgres
incomplete
2: Drizzle ORM
incomplete
3: Drizzle Queries
incomplete
4: Reset
incomplete
5: List Users
incomplete
This lesson's interactive features are locked, please to keep using them
When doing end-to-end testing on a system like this, it's always a bit annoying to have to manually reset the state of the database. For example, the register command fails if you run it again with the same username because the user already exists.
That's the behavior we want, but we have to manually reset the database each time we run tests.
Let's add a command to our CLI that will reset the database to a blank state. This will make development much easier for us (although probably not useful in production... maybe even disastrous).
npm run start reset
Run and submit the CLI tests.