questions
Who has written an automated test (in any language)?
Who is a beginner in JS? Intermediate? Advanced?
Who has done JS testing?
Who has done browser-level integration testing?
this
flavors of testing
test frameworks
runners
best practices
why test
JavaScÂript is a community of amateurs, just like PHP is. This new era of actually designing code rather than just throwing things on the floor is a different paradigm.
– AJ ONeal on JavaScript Jabber
unit testing
test a piece in isolation
integration testing
test a bunch of pieces together
anatomy of a test
Description
Setup
Action
Assertion
it("is described", function(){
var subject = setup();
subject.action();
expect(subject.property).toBe('the expected value');
});
tips
break things into small pieces
insurance
...against yourself
testable code
is better code
UX design for your code
coding from the outside in