OWL ITS + 탐지시스템(인터넷 진흥원)
jhjang
2021-10-14 722a8a9409f3bbe3da0a1c77d709d68cfb0a6705
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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);
});