From c9d2fd76da3f875f9a293ea305bd13fe6ee23964 Mon Sep 17 00:00:00 2001 From: "Kevin C. Coram" Date: Tue, 20 Aug 2019 14:35:18 -0400 Subject: [PATCH] Additional Jest configuration and dependencies --- jest.config.js | 5 ++++- package-lock.json | 15 +++++++++++++++ package.json | 17 +++++++++-------- 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/jest.config.js b/jest.config.js index b301498..d25d5ac 100644 --- a/jest.config.js +++ b/jest.config.js @@ -132,7 +132,7 @@ module.exports = { // snapshotSerializers: [], // The test environment that will be used for testing - testEnvironment: "node", + // testEnvironment: "node", // Options that will be passed to the testEnvironment // testEnvironmentOptions: {}, @@ -168,6 +168,9 @@ module.exports = { // A map from regular expressions to paths to transformers // transform: null, + transform: { + '^.+\\.(ts|js|html)$': 'ts-jest' + }, // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation // transformIgnorePatterns: [ diff --git a/package-lock.json b/package-lock.json index 0ebdc7e..443fcc7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2085,6 +2085,21 @@ "@types/istanbul-lib-report": "*" } }, + "@types/jest": { + "version": "24.0.18", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-24.0.18.tgz", + "integrity": "sha512-jcDDXdjTcrQzdN06+TSVsPPqxvsZA/5QkYfIZlq1JMw7FdP5AZylbOc+6B/cuDurctRe+MziUMtQ3xQdrbjqyQ==", + "dev": true, + "requires": { + "@types/jest-diff": "*" + } + }, + "@types/jest-diff": { + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@types/jest-diff/-/jest-diff-20.0.1.tgz", + "integrity": "sha512-yALhelO3i0hqZwhjtcr6dYyaLoCHbAMshwtj6cGxTvHZAKXHsYGdff6E8EPw3xLKY0ELUTQ69Q1rQiJENnccMA==", + "dev": true + }, "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", diff --git a/package.json b/package.json index 9d1f754..936a52c 100644 --- a/package.json +++ b/package.json @@ -42,25 +42,26 @@ "zone.js": "^0.9.1" }, "devDependencies": { + "@angular-devkit/build-angular": "^0.800.1", "@angular/cli": "8.1.1", + "@angular/compiler-cli": "^8.0.0", + "@angular/language-service": "^8.0.0", "@nrwl/angular": "^8.4.12", + "@nrwl/cypress": "8.4.12", "@nrwl/jest": "^8.4.12", "@nrwl/workspace": "8.4.12", + "@types/jest": "^24.0.18", "@types/node": "~8.9.4", + "codelyzer": "~5.0.1", + "cypress": "3.4.1", "dotenv": "6.2.0", "eslint": "6.1.0", "jest": "^24.9.0", + "jest-preset-angular": "7.0.0", "prettier": "1.16.4", "ts-jest": "^24.0.2", "ts-node": "~7.0.0", "tslint": "~5.11.0", - "typescript": "~3.4.5", - "@angular/compiler-cli": "^8.0.0", - "@angular/language-service": "^8.0.0", - "@angular-devkit/build-angular": "^0.800.1", - "codelyzer": "~5.0.1", - "jest-preset-angular": "7.0.0", - "cypress": "3.4.1", - "@nrwl/cypress": "8.4.12" + "typescript": "~3.4.5" } }