You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,6 +116,40 @@ Flowise has 3 different modules in a single mono repository.
116
116
117
117
11. Commit code and submit Pull Request from forked branch pointing to [Flowise main](https://github.com/FlowiseAI/Flowise/tree/main).
118
118
119
+
### Testing
120
+
121
+
- Unit tests are **co-located** with their source files — a testfor`Foo.ts` livesin`Foo.test.ts`in the same directory. This is the standard used across all packages in this repo.
122
+
123
+
- Run tests per package:
124
+
125
+
```bash
126
+
cd packages/server && pnpm test
127
+
cd packages/components && pnpm test
128
+
cd packages/agentflow && pnpm test
129
+
```
130
+
131
+
Or from the repo root using `--filter`:
132
+
133
+
```bash
134
+
pnpm --filter flowise-components test
135
+
pnpm --filter @flowiseai/agentflow test
136
+
pnpm --filter "./packages/server"test# root and server share the same package name.
137
+
```
138
+
139
+
- Or run all tests from the repo root:
140
+
141
+
```bash
142
+
pnpm test
143
+
```
144
+
145
+
- When adding new functionality, place your test file next to the source file it tests:
146
+
147
+
```
148
+
packages/components/nodes/tools/MyTool/
149
+
├── MyTool.ts
150
+
└── MyTool.test.ts ← co-located test
151
+
```
152
+
119
153
## 🌱 Env Variables
120
154
121
155
Flowise support different environment variables to configure your instance. You can specify the following variables in the `.env` file inside `packages/server` folder. Read [more](https://docs.flowiseai.com/environment-variables)
0 commit comments