-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
snapshot previews #73
Conversation
package.json
Outdated
"vscode:prepublish": "yarn clean-out && tsc -p ./src", | ||
"compile": "tsc -watch -p ./src", | ||
"vscode:prepublish": "yarn clean-out && tsc -p ./tsconfig.publish.json", | ||
"compile": "tsc -watch -p ./tsconfig.publish.json", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting, what were these changes for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly because when the tsconfig was in a nested directory, I couldn't augment declarations. So the extension of jest-editor-support.d.ts wasn't working properly with a nested tsconfig.
We're waiting on jestjs/jest#2629 incase people are wondering |
jestjs/jest#2629 was closed :( |
Following jestjs#2629, I rebased the code on current master. I still have to actually test the feature with jest-community/vscode-jest#73. What i would like to add ultimately is the ability to: - preview the snapshot - have the snapshot diff - have a button to accept diff per snapshot (would update it) WDYT?
* first iteration * Use babel-traverse * comments on the pr * feat(jest-editor-support): Add Snapshot metadata Following #2629, I rebased the code on current master. I still have to actually test the feature with jest-community/vscode-jest#73. What i would like to add ultimately is the ability to: - preview the snapshot - have the snapshot diff - have a button to accept diff per snapshot (would update it) WDYT?
jestjs/jest#4570 has been merged 💌 |
* first iteration * Use babel-traverse * comments on the pr * feat(jest-editor-support): Add Snapshot metadata Following jestjs#2629, I rebased the code on current master. I still have to actually test the feature with jest-community/vscode-jest#73. What i would like to add ultimately is the ability to: - preview the snapshot - have the snapshot diff - have a button to accept diff per snapshot (would update it) WDYT?
Maybe I'm mistaken but it looks like completion items are for when you type things. So you'd have to type out text in order to trigger the snapshot previews? |
Ah, yeah, more specifically I was thinking about being able to maybe override the hover popup when you highlight the "toMatchSnapshot" with a preview |
@orta anything still pending here? |
If this is working (with the rebased PR), then nope 👍 should be good to go IMO |
I hope this would be finished and merged one day, as it is a thing I'd really want to see! |
@orta I think this should be good now. Rebased and appears to still be working locally :) So if it looks good, you want to merge? |
Alright, will give it a look through now |
@bookman25 - this looks 👍 I'll happily merge and add this, can you add a way to disable it (as a setting) then this is good to go - congrats on bringing this PR back from the grave |
"*.json": ["npm run prettier-write --", "git add"], | ||
"*.ts": ["npm run prettier-write --", "git add"] | ||
"*.json": ["yarn prettier-write --", "git add"], | ||
"*.ts": ["yarn prettier-write --", "git add"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
snapshot previews
Depends on snapshot support in jest-editor-support. I'd like to do some more stuff with it, but I figure this is a good first start.