Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

test(api): isolate the instance policy test files (#2603)

Hampus4ad2858773dd
diff --git a/fluxer_api/vitest.config.ts b/fluxer_api/vitest.config.ts
index ccfc1d4d5..4d2ec09bc 100644
--- a/fluxer_api/vitest.config.ts
+++ b/fluxer_api/vitest.config.ts
@@ -28,6 +28,12 @@ const MODULE_REGISTRY_TEST_FILES = [
'src/api/risk/__tests__/AccountPolicyService.test.ts',
];
+const INSTANCE_POLICY_TEST_FILES = [
+ 'src/api/admin/tests/InstanceConfigPendingRegistrationApproval.test.ts',
+ 'src/api/auth/tests/DeferredPhoneGate.test.ts',
+ 'src/api/instance/tests/SingleCommunityService.test.ts',
+];
+
const sharedExclude = [
...configDefaults.exclude,
'pkgs/**',
@@ -76,7 +82,7 @@ export default defineConfig({
...sharedTestConfig,
name: 'api',
include: ['src/**/*.{test,spec}.{ts,tsx}'],
- exclude: [...sharedExclude, ...MODULE_REGISTRY_TEST_FILES],
+ exclude: [...sharedExclude, ...MODULE_REGISTRY_TEST_FILES, ...INSTANCE_POLICY_TEST_FILES],
isolate: false,
},
},
@@ -90,6 +96,16 @@ export default defineConfig({
isolate: true,
},
},
+ {
+ plugins: [tsconfigPaths()],
+ test: {
+ ...sharedTestConfig,
+ name: 'api-instance-policy',
+ include: INSTANCE_POLICY_TEST_FILES,
+ exclude: sharedExclude,
+ isolate: true,
+ },
+ },
],
},
});