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
Since xstate is a mature library with a thorough test suite, there are lots of tests that need to be converted. The biggest conversion hurdle has been moving from the old done callback test format to one of a few alternative callback styles based on how the done callback was used.
The code isn't entirely relevant but here's a few examples anyway, just for context:
To generate a snapshot for these conversions, here's the workflow I've found myself using:
find a good test to demonstrate a type of conversion
copy that test
tab to browser
paste it into the Before panel
add a // # comment above it
tab to vscode
edit the test to the desired outcome
copy the edited test
tab to browser
paste it into the After panel
add a // # comment above it
tab to vscode
repeat if i want more before/after pairs
generate codemod
It works but the experience of copying/pasting and tabbing back and forth between applications is frustrating at best.
Expected Results
I'd like to change my workflow like this:
@@ -1,14 +1,10 @@
1. find a good test to demonstrate a type of conversion
1. copy that test
1. tab to browser
-1. paste it into the Before panel-1. add a `// #` comment above it+1. paste it into an editor+1. do _something_ so the app knows I'm ready to make edits to the test (before)+1. edit the test inline to the desired outcome (after)+1. do _something_ (maybe?) to add the diff as a before/after example
1. tab to vscode
-1. edit the test to the desired outcome-1. copy the edited test-1. tab to browser-1. paste it into the After panel-1. add a `// #` comment above it-1. tab to vscode
1. repeat if i want more before/after pairs
1. generate codemod
Or if I'm really letting myself dream:
@@ -1,14 +1,4 @@-1. find a good test to demonstrate a type of conversion-1. copy that test-1. tab to browser-1. paste it into the Before panel-1. add a `// #` comment above it-1. tab to vscode-1. edit the test to the desired outcome-1. copy the edited test-1. tab to browser-1. paste it into the After panel-1. add a `// #` comment above it-1. tab to vscode-1. repeat if i want more before/after pairs+1. open https://github.com/statelyai/xstate repo in Codemod Studio+1. switch to my conversion PR branch+1. make inline edits to whatever tests i want to use as examples
1. generate codemod
The text was updated successfully, but these errors were encountered:
Thanks a lot for reporting @with-heart. I'm glad codemod learn resolved this for you! Also, any feedback on why you didn't know about codemod learn earlier? Did you feel like it was not easy to find in the docs? If so, let me know if you have any feedback there.
Issue Description
Select one of:
[ ] Generated codemod is not correct
[ ] Bug in Codemod Studio
[x] UI/UX improvement request
[x] Feature request
Preface
Most of my experience with Codemod has been through maintenance work on the
xstate
repo. One of the things I've been working on lately is converting the codebase fromjest
tovitest
.Since
xstate
is a mature library with a thorough test suite, there are lots of tests that need to be converted. The biggest conversion hurdle has been moving from the olddone
callback test format to one of a few alternative callback styles based on how thedone
callback was used.The code isn't entirely relevant but here's a few examples anyway, just for context:
Actual Results
To generate a snapshot for these conversions, here's the workflow I've found myself using:
// #
comment above it// #
comment above itIt works but the experience of copying/pasting and tabbing back and forth between applications is frustrating at best.
Expected Results
I'd like to change my workflow like this:
Or if I'm really letting myself dream:
The text was updated successfully, but these errors were encountered: