Skip to content

Instantly share code, notes, and snippets.

@djagya
Created September 8, 2020 12:05
Show Gist options
  • Select an option

  • Save djagya/05ac9a800341e8ca7cfd2b81837a3aa5 to your computer and use it in GitHub Desktop.

Select an option

Save djagya/05ac9a800341e8ca7cfd2b81837a3aa5 to your computer and use it in GitHub Desktop.

Revisions

  1. Danil Zakablukovskii created this gist Sep 8, 2020.
    12 changes: 12 additions & 0 deletions jest.config.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    const {createJestConfig} = require('tsdx/dist/createJestConfig');
    const {paths} = require('tsdx/dist/constants');

    process.env.BABEL_ENV = 'test';
    process.env.NODE_ENV = 'test';

    const config = createJestConfig(undefined, paths.appRoot);

    // For absolute imports
    config.modulePaths = ["<rootDir>/src"];

    module.exports = config;