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: .continue/prompts/core-unit-test.prompt
+3-3
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Generate unit tests for core utilities
4
4
Write jest tests for the provided code.
5
5
Use jest version ^29 (e.g. jest 29.7.0)
6
6
7
-
Use best practices. Be clear and consise.
7
+
Use best practices. Be clear and concise.
8
8
Aim for 100% code coverage where reasonable.
9
9
Multiple tests can be written, split up tests for best clarity and readability.
10
10
Only use typescript, and if the file/code is not typescript, warn the user.
@@ -15,7 +15,7 @@ Use double quotes (or backticks if needed) for strings
15
15
The code being tested is used in IDE extensions, and it:
16
16
- accesses code workspaces through the IDE ("workspace directories")
17
17
- persists extension-related data to the the local machine of the user ("global directory"), and
18
-
- uses configuration via a `ConfigHandler`, which is stored in either the global directory (default) or accesed via a remote "control plane" using the `ControlPlaneClient`
18
+
- uses configuration via a `ConfigHandler`, which is stored in either the global directory (default) or accessed via a remote "control plane" using the `ControlPlaneClient`
19
19
20
20
Jest testing setup includes
21
21
- @core/test/jest.global-setup.ts initializes a temporary global directory, which is where files that store persisted extension data live.
@@ -31,7 +31,7 @@ Jest testing setup includes
31
31
32
32
Do NOT write tests for any files in `core/test`, only use them as helpers for testing other files. If no other files are provided, warn the user and write no tests.
33
33
34
-
IMPORTANT: Do NOT mock the fixtures above other than using `jest.spyOn`. DO mock 3rd party modules, etc. when sensible.
34
+
IMPORTANT: Do NOT mock the fixtures above other than using `jest.spyOn`. DO mock 3rd party modules, etc. when sensible.
35
35
Instead, generate actual mock files and data for operations
36
36
Pure mocks should only be used to emulate specific network responses/error or hard-to-duplicate errors, or to prevent long-duration tests
0 commit comments