All files / report/mocks reportWithTable.js

100% Statements 7/7
100% Branches 0/0
100% Functions 2/2
100% Lines 7/7
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    1x                             1x 1x 10x       1x 1x 10x          
import { JSDOM } from 'jsdom';
 
const { document } = (new JSDOM(`
  <div id="report-page">
    <div>Title</div>
    <div>
        <div>Title</div>
        <div>
          <ol>
            <li></li>
            <li></li>
            <li></li>
          </ol>
        </div>
    </div>
  </div>
`)).window;
const page = document.getElementById('report-page');
Object.defineProperty(Object.getPrototypeOf(page), 'clientHeight', {
  get: () => 800,
  configurable: true,
});
 
const li = document.getElementsByTagName('li')[0];
Object.defineProperty(Object.getPrototypeOf(li), 'clientHeight', {
  get: () => 600,
  configurable: true,
});
 
export default page;