sls-jest
  • Getting Started
  • Core Concepts
  • AWS Credentials
  • Matchers
    • DynamoDB
    • S3
    • AppSync
    • EventBridge
  • Spies
    • Setup
    • EventBridge
  • Utilities
    • DynamoDB
  • Cookbooks
    • Github Actions
    • CDK
Powered by GitBook
On this page
  • Install sls-jest
  • Setup Jest

Was this helpful?

Edit on GitHub

Getting Started

NextCore Concepts

Last updated 2 years ago

Was this helpful?

Install sls-jest

npm i sls-jest

Setup Jest

Create a setup file:

// setupJest.ts
import { matchers } from 'sls-jest';

expect.extend(matchers);

Then use it in your (jest.config.ts) under setupFilesAfterEnv:

export default {
  // ..
  setupFilesAfterEnv: ['./setupJest.ts'];
}
jest config file