Just Test It
16
Just Test It Karma, Mocha, Sinon.js Artyom Trityak
-
Upload
artyom-trityak -
Category
Technology
-
view
767 -
download
1
Transcript of Just Test It
Why test?It’s impossible to do regression testing for big projects
Want to do refactoring - test it!
Want to deploy each sprint - test it!
Want to show how to use your module - test it!
How test: KarmaRuns your unittests in different browsers automatically: Chrome, Phantomjs, Firefox, Safari, IE
Run-on-change
Test in real devices: phones, tablets etc
How test: Sinon.jsMock modules dependencies
Mock backend requests and responses
Mock / stub methods and objects
Check methods calledWith and callCount
How test: Mocha+ChaiTest async behaviors
Different reports
Both fine: Mocha+Chai or Jasmine (2.0 is out)
Jasmine 2.0 supports Mocha-style «done» callback for async tests
or Jasmine