title: How to use a custom made library
body: <p>I have a AWS dependency layer on on folder <code>nodejs/</code></p>
  <p>There is node_modules/ and package.json with <code>npm dependencies</code></p>
  <p>I created a folder called <code>utils/</code> and my file is <code>util.js</code></p>
  <p>Since it's a layer on AWS, I import using <code>const utils = require('/opt/nodejs/utils/util');</code> on my <code>app.js</code></p>
  <p>Problem is that my test cases started failing <code>Cannot find module '/opt/nodejs/utils/util' from 'backend/lambdas/cars/app.js'</code></p>
  <p>How can I fix my test case??</p>
  <pre><code>const app = require('./app');
  
  describe('lambda', function () {
      it('something', async () =&gt; {
          const response = await app.lambdaHandler();
          ....
      });
  });
  </code></pre>
  <p>app.js</p>
  <pre><code>const httpStatusCode = require('http-status-codes');
  const cors = require('/opt/nodejs/utils/util');
  
  exports.lambdaHandler = async (event) =&gt; {
  return {
      statusCode: httpStatusCode.OK
   };
  };
  </code></pre>
  <p><strong>PS: This <code>nodejs</code> folder is on the same level as the <code>lambdas</code> folder</strong></p>