@prosopo/user-access-policy 3.9.1 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,6 +15,7 @@ import path from "node:path";
15
15
  // limitations under the License.
16
16
  import { ViteTestConfig } from "@prosopo/config";
17
17
  import dotenv from "dotenv";
18
+ import { mergeConfig } from "vitest/config";
18
19
  process.env.NODE_ENV = "test";
19
20
  // if .env.test exists at this level, use it, otherwise use the one at the root
20
21
  const envFile = `.env.${process.env.NODE_ENV || "development"}`;
@@ -29,4 +30,14 @@ if (fs.existsSync(envFile)) {
29
30
 
30
31
  dotenv.config({ path: envPath });
31
32
 
32
- export default ViteTestConfig();
33
+ // All integration tests in this package share one redis-stack instance
34
+ // at localhost:6379, and they both write to the global access-rules
35
+ // index. With vitest's default parallel file execution, the suites
36
+ // trample each other's data (row counts diverge, indexes get dropped
37
+ // mid-query). Force serial file execution so test isolation matches
38
+ // the redis isolation the suites already rely on.
39
+ export default mergeConfig(ViteTestConfig(), {
40
+ test: {
41
+ fileParallelism: false,
42
+ },
43
+ });