0.1.0 • Published 8 years ago

jasmine-matchers-loader v0.1.0

Weekly downloads
1,520
License
MIT
Repository
github
Last release
8 years ago

jasmine-matchers-loader

An API to register Jasmine Matchers compatible with Jasmine v1 and v2.

npm downloads Twitter Follow @fold_left on Twitter GitHub stars GitHub followers

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>