-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add simpler test mechanism and convert some tests #292
Conversation
omg thankyou thankyou thankyou thankyou!!!! I can't wait to merge this in, it will make writing tests so much easier!!! Does It looks like you also cover visual mode with a start/end selection but I can't quite see how that works? Your Typescript looks pretty good to me for your first try! I'll leave you a few comments to help you learn :) I don't see any blockers to getting this merged, though! (Well, aside from me fixing P, haha.) |
); | ||
newTest("$ always keeps cursor on EOL", | ||
{ | ||
start: ['text text', 'text', 'text tex|t'], |
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.
You can use backtick strings in JavaScript/TypeScrip. They can span multiple lines.
Ok, I looked a bit closer and the only thing I would like before we merge this in would be the original call stack for the error. Right now, no matter what test fails, the callstack is always The easiest way I can think of to do this is have the newTest() function simply return a boolean that indicates whether the test has failed, and then wrap assert around newTest e.g. Again, thanks a bunch! ❤️ |
efe8a63
to
831ebed
Compare
Hi Grant, Thanks for the coding tips. I have made the suggested changes. Yes you can call a single test with newTestOnly it makes testing way faster but you have to remember to change it back to newTest before committing :) Let me know if there are any other things that need changing. Have fun!
|
831ebed
to
d0ba3ee
Compare
Hi I've had a first crack at #256.
I'm new to typescript/javascript/git/github so feel free to tell me how to improve or change this to what you have in mind.
I've added an extra optional endMode: parameter so we can check the final mode.
Here is a code snippet which will make entering tests easier. Activate with 'newt':
I also added a few 'P' tests. Note that 3 tests are currently failing.