Skip to content

Instantly share code, notes, and snippets.

@mtimbs
Last active March 10, 2020 13:51
Show Gist options
  • Save mtimbs/54b15c8feb65fb229900e7529a69960e to your computer and use it in GitHub Desktop.
Save mtimbs/54b15c8feb65fb229900e7529a69960e to your computer and use it in GitHub Desktop.
example jest config
module.exports = {
setupFiles: ['./tests/setup/setEnvironment.js'],
transform: {
'^.+\\.ts?$': 'babel-jest',
},
moduleNameMapper: {
'^@repositories/(.*)$': '<rootDir>/src/repositories/$1',
'^@clients/(.*)$': '<rootDir>/src/clients/$1',
'^@transformers/(.*)$': '<rootDir>/src/transformers/$1',
'^@src/(.*)$': '<rootDir>/src/$1',
'^@tests/(.*)$': '<rootDir>/tests/$1',
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment