all files / lib/__tests__/ testdom.js

85.71% Statements 6/7
50% Branches 1/2
100% Functions 1/1
85.71% Lines 6/7
1 2 3 4 5 6 7 8 9 10 11 12 13              
(function() {
  if (Itypeof document !== 'undefined') {
    return;
  }
 
  var jsdom = require('jsdom').jsdom;
 
  global.document = jsdom('<html><head></head><body></body></html>');
  global.window = document.defaultView;
  global.navigator = {
    userAgent: 'node.js'
  };
})();