Skip to content

Commit

Permalink
chore: support angular 13 (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
William Sedlacek committed Nov 20, 2021
1 parent d1e0b86 commit 275a2ff
Show file tree
Hide file tree
Showing 9 changed files with 1,853 additions and 2,790 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ speed-measure-plugin.json
.history/*

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand Down
50 changes: 25 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,39 @@
"release:dry": "cd projects/spectator && standard-version --infile ../../CHANGELOG.md --dry-run"
},
"devDependencies": {
"@angular-builders/jest": "12.1.0",
"@angular-devkit/build-angular": "^12.1.1",
"@angular-devkit/schematics": "^12.1.1",
"@angular-eslint/builder": "12.3.1",
"@angular-eslint/eslint-plugin": "12.3.1",
"@angular-eslint/eslint-plugin-template": "12.3.1",
"@angular-eslint/schematics": "12.3.1",
"@angular-eslint/template-parser": "12.3.1",
"@angular/animations": "^12.1.1",
"@angular/cdk": "^12.1.2",
"@angular/cli": "^12.1.1",
"@angular/common": "^12.1.1",
"@angular/compiler": "^12.1.1",
"@angular/compiler-cli": "^12.1.1",
"@angular/core": "^12.1.1",
"@angular/forms": "^12.1.1",
"@angular/language-service": "^12.1.1",
"@angular/platform-browser": "^12.1.1",
"@angular/platform-browser-dynamic": "^12.1.1",
"@angular/router": "12.1.1",
"@angular-builders/jest": "13.0.0",
"@angular-devkit/build-angular": "^13.0.3",
"@angular-devkit/schematics": "^13.0.3",
"@angular-eslint/builder": "13.0.1",
"@angular-eslint/eslint-plugin": "13.0.1",
"@angular-eslint/eslint-plugin-template": "13.0.1",
"@angular-eslint/schematics": "13.0.1",
"@angular-eslint/template-parser": "13.0.1",
"@angular/animations": "^13.0.2",
"@angular/cdk": "^13.0.2",
"@angular/cli": "^13.0.3",
"@angular/common": "^13.0.2",
"@angular/compiler": "^13.0.2",
"@angular/compiler-cli": "^13.0.2",
"@angular/core": "^13.0.2",
"@angular/forms": "^13.0.2",
"@angular/language-service": "^13.0.2",
"@angular/platform-browser": "^13.0.2",
"@angular/platform-browser-dynamic": "^13.0.2",
"@angular/router": "13.0.2",
"@commitlint/cli": "12.0.1",
"@commitlint/config-angular": "12.0.1",
"@commitlint/config-conventional": "12.0.1",
"@types/jasmine": "3.8.1",
"@types/jest": "26.0.24",
"@types/node": "16.3.1",
"@typescript-eslint/eslint-plugin": "4.28.2",
"@typescript-eslint/parser": "4.28.2",
"@typescript-eslint/eslint-plugin": "5.3.0",
"@typescript-eslint/parser": "5.3.0",
"all-contributors-cli": "^6.19.0",
"core-js": "^3.9.1",
"cross-env": "^5.1.4",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^7.26.0",
"eslint": "^8.2.0",
"git-cz": "^4.7.6",
"helpful-decorators": "^2.1.0",
"husky": "^4.3.8",
Expand All @@ -78,12 +78,12 @@
"karma-jasmine": "4.0.1",
"karma-jasmine-html-reporter": "1.7.0",
"lint-staged": "^10.5.3",
"ng-packagr": "12.1.1",
"ng-packagr": "13.0.6",
"prettier": "2.3.2",
"rxjs": "6.6.3",
"standard-version": "^9.1.0",
"ts-node": "10.1.0",
"typescript": "4.3.5",
"typescript": "4.4.4",
"zone.js": "0.11.4"
},
"config": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createComponentFactory, Spectator } from '@ngneat/spectator/jest';

import { CalcComponent } from './calc.component';
import { CalcComponent } from '../../test/calc/calc.component';

describe('CalcComponent', () => {
let spectator: Spectator<CalcComponent>;
Expand Down
6 changes: 3 additions & 3 deletions projects/spectator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"tslib": "^2.1.0"
},
"peerDependencies": {
"@angular/common": ">= 12.0.0",
"@angular/router": ">= 12.0.0",
"@angular/animations": ">= 12.0.0",
"@angular/common": ">= 13.0.0",
"@angular/router": ">= 13.0.0",
"@angular/animations": ">= 13.0.0",
"typescript": ">= 4.0.0"
},
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion projects/spectator/test/events/events.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('EventsComponent', () => {
try {
spectator.keyboard.pressKey('...', 'input');
fail('Expected that an error is thrown');
} catch (e) {
} catch (e: any) {
expect(e.message).toEqual('invalid key modifier: undefined, keyStr: ...');
}
});
Expand Down
4 changes: 3 additions & 1 deletion projects/spectator/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ defineGlobalsInjections({
});

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: true },
});
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
Expand Down
2 changes: 1 addition & 1 deletion projects/spectator/tsconfig.lib.prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}
2 changes: 1 addition & 1 deletion projects/spectator/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/spec",
"target": "es5",
"target": "es2015",
"types": [
"jasmine",
"node"
Expand Down
Loading

0 comments on commit 275a2ff

Please sign in to comment.