You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
568 B
19 lines
568 B
var baseTemplate = window.document.body.innerHTML;
|
|
var wrapper = document.createElement('div');
|
|
wrapper.id = 'jasmineWrapper';
|
|
document.body.appendChild(wrapper);
|
|
|
|
beforeEach(function() {
|
|
jasmineWrapper.innerHTML = '';
|
|
|
|
jasmine.addMatchers({
|
|
toBeApprox: function() {
|
|
return {
|
|
compare: function(actual, expected, within) {
|
|
within = within || 1;
|
|
return { pass: (actual >= (expected - within)) && (actual <= (expected + within)) };
|
|
}
|
|
};
|
|
}
|
|
});
|
|
});
|
|
|