assertive-ts icon indicating copy to clipboard operation
assertive-ts copied to clipboard

feat(core): Extension mechanism

Open JoseLion opened this issue 3 years ago • 0 comments

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.

JoseLion avatar Nov 23 '22 22:11 JoseLion