assertive-ts
assertive-ts copied to clipboard
feat(core): Extension mechanism
Add an extension mechanism that allows users to add instances of Assertion<T> to the logic within the expect(..) function. These are added in the form of a Plugin<T, A extends Assertion<T> object, which contains the necessary information to determine where and when the instance is returned by the expect(..) function.
Additionally, the PR adds another example workspace called @examples/symbol-plugin, which shows how a plugin can be created as a 3rd-party library. Then the plugin is used and tested in both @examples/jest and @examples/mocha workspaces.