"use strict"; const installPrettier = require("./scripts/install-prettier"); const ENABLE_CODE_COVERAGE = !!process.env.ENABLE_CODE_COVERAGE; if (process.env.NODE_ENV === "production" || process.env.INSTALL_PACKAGE) { process.env.PRETTIER_DIR = installPrettier(); } const { TEST_STANDALONE } = process.env; module.exports = { setupFiles: ["/tests_config/run_spec.js"], snapshotSerializers: [ "jest-snapshot-serializer-raw", "jest-snapshot-serializer-ansi", ], testRegex: "jsfmt\\.spec\\.js$|__tests__/.*\\.js$", testPathIgnorePatterns: TEST_STANDALONE ? ["/tests_integration/"] : [], collectCoverage: ENABLE_CODE_COVERAGE, collectCoverageFrom: ["/src/**/*.js", "/bin/**/*.js"], coveragePathIgnorePatterns: ["/src/document/doc-debug.js"], coverageReporters: ["text", "lcov"], moduleNameMapper: { "prettier/local": "/tests_config/require_prettier.js", "prettier/standalone": "/tests_config/require_standalone.js", }, testEnvironment: "node", transform: {}, watchPlugins: [ "jest-watch-typeahead/filename", "jest-watch-typeahead/testname", ], };