Skip to content
This repository has been archived by the owner on Sep 14, 2024. It is now read-only.

v0.4.0

Compare
Choose a tag to compare
@amatosov-rbx amatosov-rbx released this 02 Oct 22:14
· 33 commits to master since this release
6c169cd
  • Added expect.extend which allows projects to register their own, opinionated expectations that integrates into expect. (#142)
    • Modeled after jest's implementation.
    • Matchers are functions that should return an object with with two keys, boolean pass and a string message
    • Like context, matchers introduced via expect.extend will be present on all nodes below the node that introduces the matchers.
    • Limitations:
      • expect.extend cannot be called from within describe blocks
      • Custom matcher names cannot overwrite pre-existing matchers, including default matchers and matchers introduces from previous expect.extend calls.
  • Change the way errors are collected to call tostring on them before further processing.
    • Luau allows non-string errors, but not concatenating non-strings or passing non-strings to debug.traceback as a message, so TestRunner needs to do that step. This is a temporary fix as the better solution would be to retain the error in object form for as long as possible to give the reporter more to work with.
    • This also makes a slight change to what's in the traceback to eliminate the unnecessary line mentioning the error collection function.
  • Fix debugging of tests in Studio