| Dimension | Shared | Only in A | Only in B | Overlap |
|---|---|---|---|---|
| Sections | 0 | 1 | 1 | 0% |
| Commands | 0 | 0 | 2 | 0% |
| Section tags | 0 | 0 | 3 | 0% |
What each file covers
Sections
0 shared · 1 only in A · 1 only in B- − Dependency Graph
- + Testing Conventions
Commands
0 shared · 0 only in A · 2 only in B- + npm run lint:openapi
- + pnpm start:worker
Section tags
0 shared · 0 only in A · 3 only in B- + test
- + code-style
- + testing-strategy
Line diff
novuhq/novu · .cursor/rules/dependency-graph.mdc
@@ −1 @@
1---
2description: Novu monorepo dependency graph — use when assessing blast radius before changing shared code
3globs:
4alwaysApply: false
5---
6
7## Dependency Graph
8
9```mermaid
10graph TD
11 subgraph apps [Apps]
12 api[api]
13 dashboard[dashboard]
14 worker[worker]
15 ws[ws]
16 end
17 subgraph libs [Libs - internal only]
18 dal[dal]
19 appGeneric[application-generic]
20 end
21 subgraph pkgs [Packages - published to NPM]
22 shared[shared]
23 framework[framework]
24 jsSDK[js]
25 reactSDK[react]
26 end
27 api --> appGeneric --> dal
28 worker --> appGeneric
29 ws --> appGeneric
30 api --> shared
31 worker --> shared
32 dashboard --> reactSDK --> jsSDK --> shared
33 dashboard --> framework
34```
35
novuhq/novu · .cursor/rules/testing.mdc
@@ +1 @@
1---
2description: Rules for writing and running tests
3globs:
4 - "**/*.spec.ts"
5 - "**/*.test.ts"
6 - "**/e2e/**"
7alwaysApply: false
8---
9
10### Testing Conventions
11
12**General**
13- Match the test style and tooling already used in the same app (Mocha for API/worker, Playwright for dashboard).
14- Shared test utilities and setup helpers live in `libs/testing` — use them instead of rolling custom harnesses.
15- Never mock MongoDB models directly; use the test harness in `libs/testing` which manages real database state.
16
17**API (`apps/api`)**
18- Unit tests: `cd apps/api && pnpm test` (Mocha + ts-node, matches `src/**/*.spec.ts`)
19- Lint: `cd apps/api && pnpm check`
20- OpenAPI validation: `npm run lint:openapi` (requires API running)
21- E2E tests: see `.cursor/skills/run-api-e2e-tests/SKILL.md`
22- Bootstrap a NestJS testing module for integration-style unit tests rather than mocking the entire DI container.
23
24**Dashboard (`apps/dashboard`)**
25- E2E tests: `cd apps/dashboard && pnpm test:e2e` (Playwright — start dashboard first)
26- Lint: `cd apps/dashboard && pnpm check`
27- Tests live in `apps/dashboard/tests/` (or `e2e/`).
28
29**Worker (`apps/worker`)**
30- Unit tests: `cd apps/worker && pnpm test` (Mocha + ts-node, matches `src/**/**/*.spec.ts`)
31- Lint: `cd apps/worker && pnpm check`
32- The worker must be running (`pnpm start:worker`) when testing end-to-end notification flows.
33
@@ −1 +1 @@
11 ---
2−description: Novu monorepo dependency graph — use when assessing blast radius before changing shared code
2+description: Rules for writing and running tests
33 globs:
4+ - "**/*.spec.ts"
5+ - "**/*.test.ts"
6+ - "**/e2e/**"
47 alwaysApply: false
58 ---
69
7−## Dependency Graph
10+### Testing Conventions
811
9−```mermaid
10−graph TD
11− subgraph apps [Apps]
12− api[api]
13− dashboard[dashboard]
14− worker[worker]
15− ws[ws]
16− end
17− subgraph libs [Libs - internal only]
18− dal[dal]
19− appGeneric[application-generic]
20− end
21− subgraph pkgs [Packages - published to NPM]
22− shared[shared]
23− framework[framework]
24− jsSDK[js]
25− reactSDK[react]
26− end
27− api --> appGeneric --> dal
28− worker --> appGeneric
29− ws --> appGeneric
30− api --> shared
31− worker --> shared
32− dashboard --> reactSDK --> jsSDK --> shared
33− dashboard --> framework
34−```
12+**General**
13+- Match the test style and tooling already used in the same app (Mocha for API/worker, Playwright for dashboard).
14+- Shared test utilities and setup helpers live in `libs/testing` — use them instead of rolling custom harnesses.
15+- Never mock MongoDB models directly; use the test harness in `libs/testing` which manages real database state.
16+
17+**API (`apps/api`)**
18+- Unit tests: `cd apps/api && pnpm test` (Mocha + ts-node, matches `src/**/*.spec.ts`)
19+- Lint: `cd apps/api && pnpm check`
20+- OpenAPI validation: `npm run lint:openapi` (requires API running)
21+- E2E tests: see `.cursor/skills/run-api-e2e-tests/SKILL.md`
22+- Bootstrap a NestJS testing module for integration-style unit tests rather than mocking the entire DI container.
23+
24+**Dashboard (`apps/dashboard`)**
25+- E2E tests: `cd apps/dashboard && pnpm test:e2e` (Playwright — start dashboard first)
26+- Lint: `cd apps/dashboard && pnpm check`
27+- Tests live in `apps/dashboard/tests/` (or `e2e/`).
28+
29+**Worker (`apps/worker`)**
30+- Unit tests: `cd apps/worker && pnpm test` (Mocha + ts-node, matches `src/**/**/*.spec.ts`)
31+- Lint: `cd apps/worker && pnpm check`
32+- The worker must be running (`pnpm start:worker`) when testing end-to-end notification flows.
3533
