|
|
@@ -75,12 +75,14 @@ export class TestPluginWithAllLifecycleHooks
|
|
|
|
|
|
/**
|
|
|
* This is required because on the first run, the Vendure server will be bootstrapped twice -
|
|
|
- * once to populate the database and the second time forthe actual tests. Thus the call counts
|
|
|
+ * once to populate the database and the second time for the actual tests. Thus the call counts
|
|
|
* for the plugin lifecycles will be doubled. This method resets them after the initial
|
|
|
* (population) run.
|
|
|
*/
|
|
|
private resetSpies() {
|
|
|
TestPluginWithAllLifecycleHooks.onConstructorFn.mockClear();
|
|
|
+ TestPluginWithAllLifecycleHooks.onBeforeBootstrapFn.mockClear();
|
|
|
+ TestPluginWithAllLifecycleHooks.onBeforeWorkerBootstrapFn.mockClear();
|
|
|
TestPluginWithAllLifecycleHooks.onBootstrapFn.mockClear();
|
|
|
TestPluginWithAllLifecycleHooks.onWorkerBootstrapFn.mockClear();
|
|
|
}
|