From a124eb3d044e73e3f86b2873c847cc03f0381162 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 3 Dec 2024 17:32:10 -0800 Subject: [PATCH] core util test prompt file --- .continue/prompts/create-core-test.prompt | 21 +++++++++++++++++++ .gitignore | 3 --- extensions/intellij/.run/Prompt Logs.run.xml | 2 +- .../.run/Start Core Dev Server (CE).run.xml | 2 +- .../.run/Start Core Dev Server.run.xml | 2 +- extensions/intellij/CONTRIBUTING.md | 2 +- 6 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 .continue/prompts/create-core-test.prompt diff --git a/.continue/prompts/create-core-test.prompt b/.continue/prompts/create-core-test.prompt new file mode 100644 index 000000000..e08ecc652 --- /dev/null +++ b/.continue/prompts/create-core-test.prompt @@ -0,0 +1,21 @@ +name: Create Core Test +description: Generate unit tests for core utilities +--- +Write jest tests for the provided code. Use best practices. Be clear and consise. +Aim for 100% code coverage where reasonable. +Multiple tests can be written, split up tests for best clarity and readability. +Only use typescript, and if the file/code is not typescript, warn the user. +Use given types to generate mock data if needed. + +Additional types can be imported from @core/gui/src/components/mainInput/types.d.ts +If any needed type declaration is still not found, warn the user. + +Existing test fixtures can be found in: +@core/test/util/fixtures.ts +- import and use `testIde` for any IDE type needs +- import and use `testControlPlaneClient` for any ControlPlaneClient needs +- import and use `testConfigHandler` for any ConfigHandler needs +- import and use `ideSettingsPromise` for any IdeSettings needs + +// This note is for if using edit mode to encourage it to create new files +The tests are to be put in a new file with the same filepath but with a .test.ts extension rather than a .ts extension \ No newline at end of file diff --git a/.gitignore b/.gitignore index 9621811de..9e783860d 100644 --- a/.gitignore +++ b/.gitignore @@ -135,9 +135,7 @@ cached_embeddings.pkl .ruff_cache codeql -**/.continue .DS_Store -.continue .test .tiktoken_cache @@ -153,7 +151,6 @@ continue_server.dist Icon Icon? -.continue .continuerc.json .prompts/ .aider* diff --git a/extensions/intellij/.run/Prompt Logs.run.xml b/extensions/intellij/.run/Prompt Logs.run.xml index 23fec409a..ce8c399dd 100644 --- a/extensions/intellij/.run/Prompt Logs.run.xml +++ b/extensions/intellij/.run/Prompt Logs.run.xml @@ -1,6 +1,6 @@ -