mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-07 19:22:14 +09:00
test(api): isolate the instance policy test files (#2603)
This commit is contained in:
@@ -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,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user