Bläddra i källkod

mock before service instantiation

Futa Arai 2 år sedan
förälder
incheckning
a7b436c101
1 ändrade filer med 3 tillägg och 3 borttagningar
  1. 3 3
      apps/app/test/integration/service/ldap-user-group-sync.test.ts

+ 3 - 3
apps/app/test/integration/service/ldap-user-group-sync.test.ts

@@ -31,13 +31,13 @@ describe('LdapUserGroupSyncService.generateExternalUserGroupTrees', () => {
     crowi = await getInstance();
     await configManager.updateConfigsInTheSameNamespace('crowi', configParams, true);
 
-    const passportService = new PassportService(crowi);
-    ldapGroupSyncService = new LdapUserGroupSyncService(passportService);
-
     mockBind.mockImplementation(() => {
       return Promise.resolve();
     });
     mockLdapCreateClient.mockImplementation(() => { return {} as Client });
+
+    const passportService = new PassportService(crowi);
+    ldapGroupSyncService = new LdapUserGroupSyncService(passportService);
   });
 
   describe('When there is no circular reference in group tree', () => {