Skip to content

Conversation

shant24k
Copy link

Added unit test cases examples of

  1. Reactive (Model-driven) Form
  2. Template driven Form

@juristr Please review & suggest any changes required.


it('name field validity', () => {
let errors = {};
let name = component.form.controls['name'];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use component.form.get('name') rather than going over the .controls['name']. That's usually the way you access form controls on reactive Angular forms. Could you change this in the test?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah sure. Updated it using get method usage. Thanks!

@juristr
Copy link
Owner

juristr commented Oct 28, 2019

@shant24k awesome, thanks for your work and sorry this isn’t going faster. I’m currently travelling (just about to start from San Francisco back home). So I’ll try to catch up with this later, ok. Meanwhile thanks a lot!

@shant24k
Copy link
Author

@shant24k awesome, thanks for your work and sorry this isn’t going faster. I’m currently travelling (just about to start from San Francisco back home). So I’ll try to catch up with this later, ok. Meanwhile thanks a lot!

@juristr Yeah sure. No problem :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants