Skip to content

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

TypeScript fluxerfluxerapp

test(api): add a native time zone project, update isolated tests

Hampus24356fca2670
diff --git a/fluxer_api/vitest.config.ts b/fluxer_api/vitest.config.ts
index d00266eb2..9862a0467 100644
--- a/fluxer_api/vitest.config.ts
+++ b/fluxer_api/vitest.config.ts
@@ -28,16 +28,14 @@ const MODULE_REGISTRY_TEST_FILES = [
'src/api/stripe/tests/StripeCheckoutCountryEnforcement.test.ts',
'src/api/stripe/tests/StripeNordicCurrencies.test.ts',
'src/api/worker/tests/CrosspostTasks.test.ts',
- 'src/api/search/tests/ThreadSearchScopeCap.test.ts',
'src/api/search/ThreadSearchScope.test.ts',
'src/api/worker/tests/HandleMentionsThread.test.ts',
- 'src/api/search/tests/GuildSearchThreadScope.test.ts',
- 'src/api/worker/tasks/HarvestUserData.test.ts',
- 'src/api/voice/tests/VoiceP2pConnectionReports.test.ts',
+ 'src/api/voice/tests/VoiceAvailabilityService.test.ts',
];
const INSTANCE_POLICY_TEST_FILES = ['src/api/admin/tests/InstanceConfigPendingRegistrationApproval.test.ts'];
+
const sharedExclude = [...configDefaults.exclude, 'pkgs/**', '../fluxer_desktop/**', '**/target/**'];
const sharedTestConfig = {
@@ -68,7 +66,12 @@ export default defineConfig({
...sharedTestConfig,
name: 'api',
include: ['src/**/*.{test,spec}.{ts,tsx}'],
- exclude: [...sharedExclude, ...MODULE_REGISTRY_TEST_FILES, ...INSTANCE_POLICY_TEST_FILES],
+ exclude: [
+ ...sharedExclude,
+ ...MODULE_REGISTRY_TEST_FILES,
+ ...INSTANCE_POLICY_TEST_FILES,
+ ...NATIVE_TIMEZONE_TEST_FILES,
+ ],
isolate: false,
},
},
@@ -92,6 +95,17 @@ export default defineConfig({
isolate: true,
},
},
+ {
+ resolve: {tsconfigPaths: true},
+ test: {
+ ...sharedTestConfig,
+ name: 'api-native-timezones',
+ include: NATIVE_TIMEZONE_TEST_FILES,
+ exclude: sharedExclude,
+ pool: 'forks',
+ isolate: true,
+ },
+ },
],
},
});