import popper.js
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
This commit is contained in:
parent
615dc56d16
commit
16fb2bb919
241 changed files with 34099 additions and 0 deletions
|
|
@ -0,0 +1,31 @@
|
|||
import simulateScroll from './utils/simulateScroll';
|
||||
|
||||
const wrapper = document.createElement('div');
|
||||
wrapper.id = 'jasmineWrapper';
|
||||
document.body.appendChild(wrapper);
|
||||
|
||||
beforeEach(function() {
|
||||
jasmine.addMatchers({
|
||||
toBeApprox: function() {
|
||||
return {
|
||||
compare: function(actual, expected, within) {
|
||||
within = within || 1.5;
|
||||
return {
|
||||
pass: actual >= expected - within && actual <= expected + within,
|
||||
};
|
||||
},
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
const reporterCurrentSpec = {
|
||||
specStarted: function(result) {
|
||||
window.testName = result.fullName;
|
||||
},
|
||||
};
|
||||
jasmine.getEnv().addReporter(reporterCurrentSpec);
|
||||
|
||||
const jasmineWrapper = document.getElementById('jasmineWrapper');
|
||||
jasmineWrapper.innerHTML = '';
|
||||
simulateScroll(document.body, 0);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue