code: function validateWindowSize ( expected, opts ) {
      var msg = "",
          documentElement = ( opts && opts.window || window ).document.documentElement,
          width = documentElement.clientWidth,
          height = documentElement.clientHeight;
  
      if ( opts && opts.exactly ) {
          if ( width !== expected.width ) msg = " Window width is " + width + "px (expected: " + expected.width + "px).";
          if ( height !== expected.height ) msg += " Window height is " + height + "px (expected: " + expected.height + "px).";
      } else {
          if ( width < expected.width ) msg = " Window width is " + width + "px (expected minimum: " + expected.width + "px).";
          if ( height < expected.height ) msg += " Window height is " + height + "px (expected minimum: " + expected.height + "px).";
      }
  
      if ( msg !== "" ) throw new Error( "The browser window does not match the expected size." + msg );
  }
docs: Makes sure a window is as at least as large as the specified minimum. If the window is too small, an error
  is thrown.
  
  Optionally, it can be validated that the window matches the expected size exactly.
  
  @param {Object}  expected
  @param {number}  expected.width
  @param {number}  expected.height
  @param {Object}  [opts]
  @param {Object}  [opts.window=window]  a window handle, defaults to the global `window`
  @param {boolean} [opts.exactly=false]