Browse Source

fix(test): Fix plugin e2e tests

Michael Bromley 5 years ago
parent
commit
e23b7d48e0

+ 3 - 1
packages/core/e2e/fixtures/test-plugins/with-all-lifecycle-hooks.ts

@@ -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();
     }