Files
openlayers/test/jasmine-extensions.js
2013-01-18 21:02:09 +01:00

18 lines
512 B
JavaScript

beforeEach(function() {
var parent = this.getMatchersClass_();
this.addMatchers({
toBeA: function(type) {
return this.actual instanceof type;
},
toBeGreaterThanOrEqualTo: function(other) {
return this.actual >= other;
},
toBeLessThanOrEqualTo: function(other) {
return this.actual <= other;
},
toRoughlyEqual: function(other, tol) {
return Math.abs(this.actual - other) <= tol;
}
});
});