jasmine-matchers-loader
An API to register Jasmine Matchers compatible with Jasmine v1 and v2.
This project was previously part of the implementation of Jasmine Matchers and has been taken out to help other people share their own Matchers.
Usage
The /src directory of Jasmine Matchers serves as an example of a many different types of matcher functions using this loader.
CommonJS
var jasmineMatchers = require('jasmine-matchers-loader');
jasmineMatchers.add({
toBeJustAnExample: function(actual) {
return actual === 'Just an example';
}
});
Browser
<script src="dist/jasmine-matchers-loader.js"></script>
<script>
window.jasmineMatchers.add({
toBeJustAnExample: function(actual) {
return actual === 'Just an example';
}
});
</script>