title: 'ReferenceError: document is not defined' error
body: <p>I'm trying to integrate Mocha into my app, but am getting <code>document is not defined</code> error. I've also tried to integrate JSDOM to resolve this but no luck there. Perhaps my implementation is wrong. Thanks in advance!</p>
  
  <p>Note: I'm testing this locally, but will host this on Amazon EC2 later. Would the document error go away on it's own when hosted live on a server?</p>
  
  <p><strong>test.js</strong><br></p>
  
  <pre><code>var test = require('../index.js');
  var assert = require('assert');
  var jsdom = require('mocha-jsdom');
  
  global.document = jsdom();
  
  describe('Mutliply', function() {
    jsdom();
    it('should equal 9 when multiply is called', function() {
      assert.equal(9, test.multiply());
    });
  });
  </code></pre>
  
  <p><strong>index.js</strong></p>
  
  <pre><code>'use strict';
  
  let test = {};
  
  let movieList = document.getElementById('movie-list');
  //bunch of code
  
  test.multiply = function() {
    return 3*3;
  }
  
  module.exports = test;
  </code></pre>