title: Error: Cannot find module mocha
body: <p>Hi I am currently trying to write some unit tests using Mocha, however when I try to import one of my local modules it cannot seem to find it and spits out the following error:</p>
  
  <pre><code>Error: Cannot find module '../../communication/Model/RequestData'
  </code></pre>
  
  <p>This seems to happen with any of my local modules.</p>
  
  <p>My Current directory goes as follows:</p>
  
  <pre><code>Lib
      src
          __tests__
              communication
                  DataChannel.test.ts
          communication
              models
                  RequestData.ts
              DataChannel.ts
  </code></pre>
  
  <p>My current tests import the following</p>
  
  <pre><code>import { assert, should } from 'chai'
  import { describe } from 'mocha';
  import { spy } from 'sinon';
  import { IRequestData, RequestData } from '../../communication/models/RequestData';
  import DataChannel from '../../communication/DataChannel';
  </code></pre>
  
  <p>Here is how I export my files:</p>
  
  <p>RequestData.ts:</p>
  
  <pre><code>/**
   * @description Interface for request data
   */
  export interface IRequestData {
      resource: string,
      data: any
  }
  
  /**
   * @class Model for request data
   */
  export class RequestData implements IRequestData {
      public resource: string = '';
      public  data: any = null;
  }
  </code></pre>
  
  <p>and here is my DataChannel.ts:</p>
  
  <pre><code>import { IRequestData } from "./models/RequestData";
  
  /**
   * @class This class handles all data communication
   */
  export default class DataChannel {
      /**
       * @constructor Constructor for the class
       */
      constructor() {
  
      }
  
      /**
       * @method Request Makes a request to the endpoint specified 
       * @public
       * @param data The data we are passing over to the endpoint
       */
      static Request(data: IRequestData): void {
          throw new Error("Method not implemented.");
      }
  }
  </code></pre>