Using with DynamoDB

    1. First, install
    • npm
    • Yarn
    • pnpm
    1. yarn add --dev @shelf/jest-dynamodb
    1. Specify preset in your Jest configuration:
    1. {
    2. }
    1. Create jest-dynamodb-config.js and define DynamoDB tables
    1. Configure DynamoDB client
    1. const isTest = process.env.JEST_WORKER_ID;
    2. const config = {
    3. convertEmptyValues: true,
    4. sslEnabled: false,
    5. region: 'local-env',
    6. }),
    7. };
    1. Write tests