Skip to content

Commit

Permalink
Suppress console output when running tests (#5759)
Browse files Browse the repository at this point in the history
  • Loading branch information
timleslie authored May 19, 2021
1 parent 8da79e7 commit 016ccad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-buckets-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-next/keystone': patch
---

Suppresed migration console output when running tests.
12 changes: 7 additions & 5 deletions packages-next/keystone/src/lib/migrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,13 @@ async function ensureDatabaseExists(dbUrl: string, schemaDir: string) {
const created = await createDatabase(dbUrl, schemaDir);
if (created) {
const credentials = uriToCredentials(dbUrl);
console.log(
`✨ ${credentials.type} database "${credentials.database}" created at ${getDbLocation(
credentials
)}`
);
if (!process.env.TEST_ADAPTER) {
console.log(
`✨ ${credentials.type} database "${credentials.database}" created at ${getDbLocation(
credentials
)}`
);
}
}
// TODO: handle createDatabase returning a failure (prisma's cli does not handle it though so not super worried)
}
Expand Down

1 comment on commit 016ccad

@vercel
Copy link

@vercel vercel bot commented on 016ccad May 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.