backend-test-utils: avoid cleanup if no databases are supported
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/backend-test-utils': patch
|
||||
---
|
||||
|
||||
`TestDatabases.create` will no longer set up an `afterAll` test handler if no databases are supported.
|
||||
@@ -91,9 +91,11 @@ export class TestDatabases {
|
||||
|
||||
const databases = new TestDatabases(supportedIds);
|
||||
|
||||
afterAll(async () => {
|
||||
await databases.shutdown();
|
||||
});
|
||||
if (supportedIds.length > 0) {
|
||||
afterAll(async () => {
|
||||
await databases.shutdown();
|
||||
});
|
||||
}
|
||||
|
||||
return databases;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user