Skip to content

Commit 0df93f2

Browse files
Migrate from Angular 6 to 7 and update packages
1 parent a2bdd0f commit 0df93f2

File tree

5 files changed

+12374
-5010
lines changed

5 files changed

+12374
-5010
lines changed

angular-reactive-validation/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-reactive-validation",
3-
"description": "I believe Reactive Forms validation shouldn't require the developer to write lots of HTML to show validation messages. This library makes it easy.",
4-
"version": "1.0.0",
3+
"description": "Reactive Forms validation shouldn't require the developer to write lots of HTML to show validation messages. This library makes it easy.",
4+
"version": "2.0.0",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/davidwalschots/angular-reactive-validation.git"
@@ -19,9 +19,9 @@
1919
"license": "MIT",
2020
"private": false,
2121
"peerDependencies": {
22-
"@angular/core": "^6.0.0",
23-
"@angular/common": "^6.0.0",
24-
"@angular/forms": "^6.0.0",
22+
"@angular/core": "^7.0.0",
23+
"@angular/common": "^7.0.0",
24+
"@angular/forms": "^7.0.0",
2525
"rxjs": "^6.1.0"
2626
},
2727
"ngPackage": {

angular-reactive-validation/src/validation-messages/validation-messages.component.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ describe('ValidationMessagesComponent', () => {
5454
});
5555

5656
it(`for property handles a single input string`, () => {
57-
component.for = 'firstName';
57+
expect(() => component.for = 'firstName').not.toThrow();
5858
});
5959

6060
it(`for property handles a single input FormControl`, () => {
61-
component.for = firstNameControl;
61+
expect(() => component.for = firstNameControl).not.toThrow();
6262
});
6363

6464
it(`for property handles an array with strings and FormControls`, () => {
65-
component.for = [firstNameControl, 'middleName', lastNameControl];
65+
expect(() => component.for = [firstNameControl, 'middleName', lastNameControl]).not.toThrow();
6666
});
6767

6868
it(`isValid returns true when there are no controls with ValidationErrors and they are touched (default configuration)`, () => {

angular-reactive-validation/src/validator-declaration.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export class ValidatorDeclaration {
6060
}
6161

6262
private static unwrapArgument<T>(arg: T | (() => T)): T {
63-
if (typeof arg === 'function') {
63+
if (arg instanceof Function) {
6464
arg = arg();
6565
}
6666

0 commit comments

Comments
 (0)