Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

test: isolate filesystem integration suites

tianma-if533a9bf63861
diff --git a/package.json b/package.json
index beb61d80..3e76472e 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,9 @@
"packages/*"
],
"scripts": {
- "test": "bun test --path-ignore-patterns='tests/e2e/**'",
+ "test": "bun run test:bulk && bun run test:integration",
+ "test:bulk": "bun test --path-ignore-patterns='tests/e2e/**' --path-ignore-patterns='apps/api/src/companion-learning.test.mjs' --path-ignore-patterns='apps/api/src/resource-upload-integration.test.mjs'",
+ "test:integration": "bun test apps/api/src/companion-learning.test.mjs apps/api/src/resource-upload-integration.test.mjs",
"dev": "bun run dev:local",
"dev:api": "bun run dev:api:local",
"dev:local": "bun scripts/local-dev.mjs start local",
diff --git a/tests/deployment-entrypoints.test.ts b/tests/deployment-entrypoints.test.ts
index 0efb497d..2fc2ee15 100644
--- a/tests/deployment-entrypoints.test.ts
+++ b/tests/deployment-entrypoints.test.ts
@@ -456,7 +456,13 @@ describe("Cloudflare deployment entrypoints", () => {
expect(workflow).not.toContain("force_redeploy:");
expect(workflow).toContain("bun run db:migrate:local");
expect(bunConfig).toContain('pathIgnorePatterns = ["tests/e2e/**"]');
- expect(scripts.test).toBe("bun test --path-ignore-patterns='tests/e2e/**'");
+ expect(scripts.test).toBe("bun run test:bulk && bun run test:integration");
+ expect(scripts["test:bulk"]).toContain("--path-ignore-patterns='tests/e2e/**'");
+ expect(scripts["test:bulk"]).toContain("apps/api/src/companion-learning.test.mjs");
+ expect(scripts["test:bulk"]).toContain("apps/api/src/resource-upload-integration.test.mjs");
+ expect(scripts["test:integration"]).toBe(
+ "bun test apps/api/src/companion-learning.test.mjs apps/api/src/resource-upload-integration.test.mjs",
+ );
expect(workflow).toContain("bun run test");
expect(workflow.match(/if: steps\.upstream\.outputs\.align_mode == 'merge'/g)).toHaveLength(2);
expect(workflow).toContain("git push origin HEAD:main");