Skip to content

feat: Add self-test helper to script.js - #6

Open
curtisahuang wants to merge 4 commits into
mainfrom
cosine/add-joke-to-readme
Open

feat: Add self-test helper to script.js#6
curtisahuang wants to merge 4 commits into
mainfrom
cosine/add-joke-to-readme

Conversation

@curtisahuang

@curtisahuang curtisahuang commented Apr 23, 2026

Copy link
Copy Markdown
Owner

Runtime Push Summary

  • Base branch: main
  • Head branch: cosine/add-joke-to-readme
  • Latest pushed commit: 01640c2aac5b4285fbce37b4cbade70c61ae5fe3

Commits in PR scope

  • feat: Add joke to README (9b342cd)
  • feat: Add self-test helper to script.js (99cdc83)
  • refactor: Rename runSelfTest to fakeFunction (4ae96d6)
  • refactor: Rename test helper function to testfxn (01640c2)

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>
@vercel

vercel Bot commented Apr 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
personal Ready Ready Preview, Comment Apr 23, 2026 11:13am

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>
@curtisahuang curtisahuang changed the title Add joke to readme and show code diff feat: Add self-test helper to script.js Apr 23, 2026
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) });
};

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment goes here

@curtisahuang

Copy link
Copy Markdown
Owner Author

@cosine-brosine can you give me a haiku

@cosineai

cosineai Bot commented May 7, 2026

Copy link
Copy Markdown

@cosine-brosine can you give me a haiku

@curtisahuang Autumn winds whisper,
Ancient leaves drift to the pond,
Quiet breaths at dusk.

@curtisahuang

Copy link
Copy Markdown
Owner Author

@dosine test me

@curtisahuang

Copy link
Copy Markdown
Owner Author

@cosine-brosine hello test me

@cosineai

cosineai Bot commented May 7, 2026

Copy link
Copy Markdown

@cosine-brosine hello test me

@curtisahuang I'm not sure I understand your comment. Could you clarify what you mean?

@curtisahuang

Copy link
Copy Markdown
Owner Author

@cosine-brosine short circuit

@cosineai

cosineai Bot commented May 7, 2026

Copy link
Copy Markdown

@cosine-brosine short circuit

@curtisahuang I'm not sure I understand your comment. Could you clarify what you mean?

@curtisahuang

Copy link
Copy Markdown
Owner Author

@dosine testing

@cosineai

cosineai Bot commented May 7, 2026

Copy link
Copy Markdown

@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.

@curtisahuang

Copy link
Copy Markdown
Owner Author

@cosine hi

@curtisahuang

Copy link
Copy Markdown
Owner Author

@cosine-brosine test me

@cosineai

cosineai Bot commented May 7, 2026

Copy link
Copy Markdown

@cosine-brosine test me

@curtisahuang I'm not sure I understand your comment. Could you clarify what you mean?

@curtisahuang

Copy link
Copy Markdown
Owner Author

@dosine hi there

@cosineai

cosineai Bot commented May 7, 2026

Copy link
Copy Markdown

@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.

@curtisahuang

Copy link
Copy Markdown
Owner Author

@dosine tell me a joke

@cosineai

cosineai Bot commented May 7, 2026

Copy link
Copy Markdown

@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() {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dosine yo

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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);

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dosine hello friendo

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dosine hello friendo

@curtisahuang I'm not sure I understand your comment. Could you clarify what you mean?

@dosine-staging

dosine-staging Bot commented May 8, 2026

Copy link
Copy Markdown

Local CLI2 PR review task failed: No installation found

@dosine-staging

dosine-staging Bot commented May 8, 2026

Copy link
Copy Markdown

Local CLI2 PR review task failed: No installation found

3 similar comments
@dosine-staging

dosine-staging Bot commented May 8, 2026

Copy link
Copy Markdown

Local CLI2 PR review task failed: No installation found

@dosine-staging

dosine-staging Bot commented May 8, 2026

Copy link
Copy Markdown

Local CLI2 PR review task failed: No installation found

@dosine-staging

dosine-staging Bot commented May 8, 2026

Copy link
Copy Markdown

Local CLI2 PR review task failed: No installation found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant