This repository has been archived by the owner on Sep 14, 2024. It is now read-only.
v0.4.0
- Added
expect.extend
which allows projects to register their own, opinionated expectations that integrates intoexpect
. (#142)- Modeled after jest's implementation.
- Matchers are functions that should return an object with with two keys, boolean
pass
and a stringmessage
- Like
context
, matchers introduced viaexpect.extend
will be present on all nodes below the node that introduces the matchers. - Limitations:
expect.extend
cannot be called from withindescribe
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.
- Luau allows non-string errors, but not concatenating non-strings or passing non-strings to
- Fix debugging of tests in Studio