backend-test-utils: switch autoStop option to use afterEach | never
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user