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
Work step-by-step. If presented with an implementation plan, implement the plan exactly. If the plan presents more than one implementation option, consult with the human user to decide between options. If you are tempted to embellish or imporve upon the plan, consult with the human user. Always complete the current task and wait for human review before proceeding to the next task.
3. **Set Default Mock Implementations, Then Dynamically Import Modules:**
60
-
You must dynamically import the modules to be mocked and/or tested *after* registering mocks and setting any mock implementations. This ensures that when `MyService` attempts to import `node:fs/promises`, it gets your mocked version. Depending how you want to scope your mock implementations, you can do this in `beforeAll`, `beforeEach`, or at the top of each test.
If you have a class `MyClass` that has both instance methods and static methods, you can mock it in an **ES Modules + TypeScript** setup using the same pattern. For instance:
108
-
109
-
```typescript
110
-
// 1. Create typed jest mock functions using the original types
111
-
type InitResult = { data: string };
112
-
113
-
const mockInit = jest.fn() as jest.MockedFunction<MyClass['init']>;
114
-
const mockDoWork = jest.fn() as jest.MockedFunction<MyClass['doWork']>;
115
-
const mockStaticHelper = jest.fn() as jest.MockedFunction<typeof MyClass.staticHelper>;
116
-
117
-
// 2. Use jest.unstable_mockModule with an ES6 class in the factory
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,14 +40,14 @@ This will show the available commands and options.
40
40
The task manager supports multiple LLM providers for generating project plans. You can configure one or more of the following environment variables depending on which providers you want to use:
41
41
42
42
-`OPENAI_API_KEY`: Required for using OpenAI models (e.g., GPT-4)
43
-
-`GEMINI_API_KEY`: Required for using Google's Gemini models
43
+
-`GOOGLE_GENERATIVE_AI_API_KEY`: Required for using Google's Gemini models
44
44
-`DEEPSEEK_API_KEY`: Required for using Deepseek models
45
45
46
46
To generate project plans using the CLI, set these environment variables in your shell:
47
47
48
48
```bash
49
49
export OPENAI_API_KEY="your-api-key"
50
-
exportGEMINI_API_KEY="your-api-key"
50
+
exportGOOGLE_GENERATIVE_AI_API_KEY="your-api-key"
51
51
export DEEPSEEK_API_KEY="your-api-key"
52
52
```
53
53
@@ -61,7 +61,7 @@ Or you can include them in your MCP client configuration to generate project pla
0 commit comments