Angular2 FormBuilder Unit Tests
Chris Pawlukiewicz

This article **rules**: my colleagues and I couldn’t find any docs on testing FormBuilder stuff, so this saved us a lot of time. Thank you!

I noticed that on lines 30–32 of login.component.ts, you’re manually keeping this.formValidin sync with this.loginForm.valid. Could you do away with this and just use this.loginForm.valid? In general, it’s best to avoid duplicating state and manually syncing it, but I don’t know ng2 well enough to know if there’s a reason for it in this case.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.