Getting Started

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 file (jest.config.ts) under setupFilesAfterEnv:
export default {
// ..
setupFilesAfterEnv: ['./setupJest.ts'];
}
Last modified 1mo ago