backend-test-utils: switch autoStop option to use afterEach | never

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-12-02 16:41:00 +01:00
parent 1f2edda7c3
commit e507d9dbb7
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ export interface TestBackendOptions<
TExtensionPoints extends any[],
> {
// (undocumented)
autoStop?: boolean;
autoStop?: 'afterEach' | 'never';
// (undocumented)
extensionPoints?: readonly [
...{
@@ -117,7 +117,7 @@ describe('TestBackend', () => {
const backend = await startTestBackend({
services: [],
features: [testModule()],
autoStop: false,
autoStop: 'never',
});
expect(shutdownSpy).not.toHaveBeenCalled();
@@ -51,7 +51,7 @@ export interface TestBackendOptions<
},
];
features?: BackendFeature[];
autoStop?: boolean;
autoStop?: 'afterEach' | 'never';
}
const defaultServiceFactories = [
@@ -71,7 +71,7 @@ export async function startTestBackend<
services = [],
extensionPoints = [],
features = [],
autoStop = true,
autoStop = 'afterEach',
...otherOptions
} = options;