/** @type {import('ts-jest').JestConfigWithTsJest} */1module.exports = {2moduleDirectories: ["dist", "node_modules"],3preset: "ts-jest",4testEnvironment: "jsdom",5testEnvironmentOptions: {6// needed or jest imports the ts directly rather than the compiled7// dist exported from our package.json. Without this imports won't work.8// See https://jestjs.io/docs/configuration#testenvironment-string9customExportConditions: ["node", "node-addons"],10},11testMatch: ["**/?(*.)+(spec|test).ts?(x)"],12globals: {13"ts-jest": {14tsconfig: "tsconfig-dist.json",15},16},17setupFilesAfterEnv: ["./test/setup.js"],18};192021