Files
openlayers/test/jasmine-extensions.js
2012-09-24 23:26:49 +02:00

12 lines
307 B
JavaScript

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