Jump to content

Approval Tests 2.0 Breaking Changes


Recommended Posts

I introduced some breaking changes in this version. For some reason, these release notes didn't show up on VIPM so I added them here. Sorry about that, I'll need to investigate why they aren't showing up.

TLDR

  • "pass if approved" needs to be replaced with "verify.vim" If you are using one of the officially supported frameworks (Caraya, LUnit, VITester) then use the verify in that extension library (it includes the assert for the framework.) 
  • I recommend that you install Beyond Compare (paid but worth it) or WinMerge (free alternative). Approvals will automatically open either if your test fails. This makes it much easier to see what changed and to approve those changes.
  • Check out the new verify types. The combination and parameterized tests are particularly useful.


Version 2.0 - Breaking Changes

  • Renamed pass if approved.vi to verify.vim It now accepts anything, not just strings.
  • Changed .actual to .approved and added a second suffix (ie .approved.txt or .received.json)
  • Added several different verify methods. JSON, File, Combinations, Parameterized, and CLI.
  • Created extensions for VITester, Caraya, and LUnit
  • Added an options class
  • Added scrubbers for cleaning up output. You can now replace things like dates or GUIDs with tokens.
  • Added reporters for viewing diffs
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.