UNPKG

jest-preset-angular

Version:

Jest preset configuration for Angular projects

22 lines (21 loc) 1.29 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.globalSetup = void 0; const ngcc_jest_processor_1 = require("../utils/ngcc-jest-processor"); const globalSetup = () => __awaiter(void 0, void 0, void 0, function* () { const ngJestConfig = globalThis.ngJest; const tsconfig = ngJestConfig === null || ngJestConfig === void 0 ? void 0 : ngJestConfig.tsconfig; if (!(ngJestConfig === null || ngJestConfig === void 0 ? void 0 : ngJestConfig.skipNgcc)) { (0, ngcc_jest_processor_1.runNgccJestProcessor)(tsconfig); } }); exports.globalSetup = globalSetup;