Open
Description
I have a monorepo managed by nx
. Each package in this repo references the jest config file from repo root directory. I need to use @shelf/jest-dynamodb
to support running dynamodb local for test cases. (https://github.com/shelfio/jest-dynamodb)
One of the package is under packages/is-even/jest.config.js
like below:
import path from 'path';
/* eslint-disable */
process.env.JEST_DYNAMODB_CONFIG = path.resolve(__dirname, './jest-dynamodb-config');
console.log('JEST_DYNAMODB_CONFIG:', process.env.JEST_DYNAMODB_CONFIG);
export default {
displayName: 'is-even',
preset: '../../jest.preset.js',
};
the root level jest.preset.js
is:
module.exports = {
preset: '@shelf/jest-dynamodb',
testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'],
resolver: '@nx/jest/plugins/resolver',
moduleFileExtensions: ['ts', 'js'],
transform: { '^.+\\.(ts|js|html)$': ['ts-jest', [Object]] },
testEnvironment: 'node',
testEnvironmentOptions: { customExportConditions: ['node', 'require', 'default'] },
testTimeout: 5000,
when running the test case, the local dynamodb instance is not launched. Is there a way to make it work with monorepo?
Metadata
Metadata
Assignees
Labels
No labels