chore: Vitest migration skills#33596
Conversation
cypress
|
||||||||||||||||||||||||||||||||||||||||
| Project |
cypress
|
| Branch Review |
chore/mocha-to-vitest-skills
|
| Run status |
|
| Run duration | 18m 57s |
| Commit |
|
| Committer | Cacie Prins |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
11
|
|
|
1112
|
|
|
0
|
|
|
27222
|
| View all changes introduced in this branch ↗︎ | |
UI Coverage
61.04%
|
|
|---|---|
|
|
28
|
|
|
47
|
Accessibility
99.02%
|
|
|---|---|
|
|
0 critical
3 serious
1 moderate
0 minor
|
|
|
18
|
|
|
||
| ## Reference migration | ||
|
|
||
| - **`packages/server/test/unit/browsers/cdp-command-queue.spec.ts`** — migrated from `cdp-command-queue_spec.ts`; replaces **`expect(commandPromise).to.eventually.equal(resolution)`** with **`await expect(commandPromise).resolves.toBe(resolution)`**. |
There was a problem hiding this comment.
how is an agent able to tell what this reference migration is since there is no historical copy present?
There was a problem hiding this comment.
That's a good question! The file references are probably not useful, but the example is. It may be good reference for us, because that's the file it used as a reference for the migration: these skills were written as notes taken by the agent, during the migration of the referenced file.
| @@ -0,0 +1,111 @@ | |||
| --- | |||
| name: server-lib-js-to-ts | |||
There was a problem hiding this comment.
Do we have a naming convention for skills in the repo? Or does everything sit somewhat flat in the root with a folder with the named skill?
There was a problem hiding this comment.
This matches Claude's skills documentation. Folder matches skill name, kebab-case, Skill file only.
There was a problem hiding this comment.
Are there additional ways to organize skills, or must the folder structure be flat?
AtofStryker
left a comment
There was a problem hiding this comment.
The skills look good on my end and I look forward to trying them out!
The only concern I have right now is this is introducing the skills to a vitest migration in the server package, which I don't think we are ready for quite yet as the TS migration isn't complete. Trying to introduce vitest in a hybrid package has some loader difficulties and makes migration of two goals (TS and vitest) much more difficult once we introduce that path.
I'd like to start with the JS -> TS skills and we can iterate in parallel on this effort. Once we get to a place where this is mostly done and introducing vitest is much easier, then I think we introduce the rest of the skills and iterate in parallel on migrating tests. But right now, I think opening that can of worms while we are mid TS conversion isn't the best choice.
Would you be willing to make a PR for just the JS -> TS skills and we start with that?
Additional details
Adds a library of skills that direct AI in how to migrate unit tests in packages/server from mocha to vitest, including some basic js->ts skills.
Note
Low Risk
Documentation-only changes that add new
.cursor/skillsmarkdown guides and expose them to version control; no runtime code or test behavior is modified.Overview
Adds a versioned library of
.cursor/skills/*/SKILL.mdguides for migrating@packages/serverunit tests from Mocha to Vitest and from JS to TS (including mocking, nock, fake timers, Chai plugin replacements, and ASI/no-semicolon pitfalls).Updates
.gitignoreto stop ignoring.cursor/skills, and links these new skills frompackages/server/AGENTS.mdso contributors can discover the migration playbook.Reviewed by Cursor Bugbot for commit 02cb1f5. Bugbot is set up for automated code reviews on this repo. Configure here.
Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation?type definitions?