Skip to content

Commit

Permalink
refactor(devs-infra): remove NgJestConfig and its related deps (#973)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnpnl authored Jul 22, 2021
1 parent 0359d03 commit ce7fc60
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 5,585 deletions.
10 changes: 1 addition & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,10 @@
"ts-jest": "^27.0.0"
},
"peerDependencies": {
"@angular-devkit/build-angular": ">=0.901.12",
"@angular/core": ">=9.0.0",
"@angular/platform-browser-dynamic": ">=9.0.0",
"webpack": "^4.0.0 || ^5.30.0"
},
"peerDependenciesMeta": {
"webpack": {
"optional": true
}
"@angular/platform-browser-dynamic": ">=9.0.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.1102.14",
"@angular/common": "^11.2.14",
"@angular/compiler": "^11.2.14",
"@angular/compiler-cli": "^11.2.14",
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/downlevel-ctor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { readFileSync } from 'fs';
import { join } from 'path';

import { SOURCE_MAPPING_PREFIX } from 'ts-jest/dist/compiler/compiler-utils';
import { ConfigSet } from 'ts-jest/dist/config/config-set';

import { NgJestCompiler } from '../compiler/ng-jest-compiler';
import { NgJestConfig } from '../config/ng-jest-config';
import { constructorDownlevelCtor } from '../transformers/downlevel-ctor';

import { jestCfgStub } from './__helpers__/test-constants';
Expand All @@ -28,7 +28,7 @@ const baseJestCfg = {
};

test.each([true, false])('should add ctor param to class constructor', (useESM) => {
const ngJestConfig = new NgJestConfig({
const ngJestConfig = new ConfigSet({
...baseJestCfg,
globals: {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/ng-jest-compiler.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { readFileSync } from 'fs';
import { join } from 'path';

import { jest } from '@jest/globals';
import { ConfigSet } from 'ts-jest/dist/config/config-set';

import { NgJestCompiler } from '../compiler/ng-jest-compiler';
import { NgJestConfig } from '../config/ng-jest-config';

import { jestCfgStub } from './__helpers__/test-constants';
import { mockFolder } from './__helpers__/test-helpers';
Expand Down Expand Up @@ -33,7 +33,7 @@ describe('NgJestCompiler', () => {
test.each([true, false])(
'should transform codes with useESM %p using hoisting, replace resources and downlevel ctor transformers',
(useESM) => {
const ngJestConfig = new NgJestConfig({
const ngJestConfig = new ConfigSet({
...baseJestCfg,
globals: {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/replace-resources.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { readFileSync } from 'fs';
import { join } from 'path';

import { SOURCE_MAPPING_PREFIX } from 'ts-jest/dist/compiler/compiler-utils';
import { ConfigSet } from 'ts-jest/dist/config/config-set';

import { NgJestCompiler } from '../compiler/ng-jest-compiler';
import { NgJestConfig } from '../config/ng-jest-config';
import { replaceResources } from '../transformers/replace-resources';

import { jestCfgStub } from './__helpers__/test-constants';
Expand Down Expand Up @@ -34,7 +34,7 @@ const baseJestCfg = {
test.each([true, false])(
'should keep styles/template and transform styleUrls/templateUrl to proper syntax for CommonJS/ESM',
(useESM) => {
const ngJestConfig = new NgJestConfig({
const ngJestConfig = new ConfigSet({
...baseJestCfg,
globals: {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
Expand Down
68 changes: 0 additions & 68 deletions src/config/ng-jest-config.ts

This file was deleted.

Loading

0 comments on commit ce7fc60

Please sign in to comment.