Files
edx-platform/cms/static/js/certificates/spec/custom_matchers.js
Eric Fischer 5bc6b31e29 eslint --fix
2017-12-08 14:38:41 -05:00

25 lines
830 B
JavaScript

// Custom matcher library for Jasmine test assertions
// http://tobyho.com/2012/01/30/write-a-jasmine-matcher/
define(['jquery'], function($) { // eslint-disable-line no-unused-vars
'use strict';
return function() {
jasmine.addMatchers({
toBeCorrectValuesInModel: function() {
// Assert the value being tested has key values which match the provided values
return {
compare: function(actual, values) {
var passed = _.every(values, function(value, key) {
return actual.get(key) === value;
});
return {
pass: passed
};
}
};
}
});
};
});