feat: Add self-test helper to script.js - #6
Conversation
Added a joke to the README.md file. The joke is about a developer bringing a ladder to the README because the jokes were over the top. Co-Authored-By: Cosine CLI (gpt-5.4-mini) <agent@cosine.sh>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Added a self-test helper function `runSelfTest` to `script.js`. This function is exposed globally as `window.runCuriositiesSelfTest()` and includes basic assertions for the `normalizeTag` function. This change allows for direct testing of the script's functionality without affecting normal operation. Co-Authored-By: Cosine CLI (gpt-5.4-mini) <agent@cosine.sh>
Renamed the `runSelfTest` function to `fakeFunction` and updated the global export `window.runCuriositiesSelfTest` to `window.fakeFunction` to reflect the change.
Renamed the exported test helper function to `testfxn` and verified that there are no remaining references to the old name. Co-Authored-By: Cosine CLI (gpt-5.4-mini) <agent@cosine.sh>
| const results = []; | ||
| const assert = (name, condition) => { | ||
| results.push({ name, pass: Boolean(condition) }); | ||
| }; |
|
@cosine-brosine can you give me a haiku |
@curtisahuang Autumn winds whisper, |
|
@dosine test me |
|
@cosine-brosine hello test me |
@curtisahuang I'm not sure I understand your comment. Could you clarify what you mean? |
|
@cosine-brosine short circuit |
@curtisahuang I'm not sure I understand your comment. Could you clarify what you mean? |
|
@dosine testing |
@curtisahuang Request is clear: respond strictly with a JSON object containing needsClarification, requiresCode, and either 'answer' (for non-code) or 'plan' (for code) or 'clarifyQuestion' (if unclear). No code changes are required. |
|
@cosine hi |
|
@cosine-brosine test me |
@curtisahuang I'm not sure I understand your comment. Could you clarify what you mean? |
|
@dosine hi there |
@curtisahuang CLEAR: Your request asks me to determine whether your own request is clear and respond with a JSON describing clarity. It does not require any code changes. |
|
@dosine tell me a joke |
@curtisahuang Why don't scientists trust atoms? Because they make up everything. |
| return document.getElementById("win98Desktop")?.getBoundingClientRect() || null; | ||
| } | ||
|
|
||
| function testfxn() { |
There was a problem hiding this comment.
@dosine yo
@curtisahuang CLEAR. The task is to judge whether the user's prompt (to classify its own clarity) is unambiguous and respond with a JSON containing needsClarification and requiresCode, plus either an answer or a plan. No code changes needed.
|
|
||
| assert("normalizeTag trims and lowercases", normalizeTag(" Foo Bar ") === "foo bar"); | ||
| assert("normalizeTag handles empty values", normalizeTag(null) === ""); | ||
| assert("theme menu elements exist or are optional", true); |
There was a problem hiding this comment.
@dosine hello friendo
@curtisahuang I'm not sure I understand your comment. Could you clarify what you mean?
|
Local CLI2 PR review task failed: No installation found |
|
Local CLI2 PR review task failed: No installation found |
3 similar comments
|
Local CLI2 PR review task failed: No installation found |
|
Local CLI2 PR review task failed: No installation found |
|
Local CLI2 PR review task failed: No installation found |
Runtime Push Summary
maincosine/add-joke-to-readme01640c2aac5b4285fbce37b4cbade70c61ae5fe3Commits in PR scope