2012-03-13 17:29:42 +00:00
|
|
|
!SLIDE
|
|
|
|
# So that's pretty much it.
|
|
|
|
|
|
|
|
!SLIDE even-larger
|
|
|
|
# Basic parts of Jasmine unit tests
|
|
|
|
|
|
|
|
``` coffeescript
|
|
|
|
describe
|
|
|
|
it
|
|
|
|
expect
|
|
|
|
toSomething()
|
|
|
|
beforeEach
|
|
|
|
afterEach
|
|
|
|
```
|
|
|
|
|
|
|
|
!SLIDE even-larger
|
|
|
|
# Mocking and stubbing
|
|
|
|
|
|
|
|
``` coffeescript
|
|
|
|
direct method replacement
|
|
|
|
spyOn()
|
|
|
|
toHaveBeenCalled()
|
|
|
|
toHaveBeenCalledWith()
|
|
|
|
```
|
|
|
|
|
|
|
|
!SLIDE
|
|
|
|
# Running Jasmine in your project
|
|
|
|
|
|
|
|
!SLIDE even-larger
|
|
|
|
# Hints and tips for JavaScript testing
|
|
|
|
|
|
|
|
``` coffeescript
|
|
|
|
waitsFor()
|
|
|
|
runs()
|
|
|
|
```
|
|
|
|
|
|
|
|
!SLIDE
|
2012-03-22 13:48:09 +00:00
|
|
|
## [Jasmine documentation](http://pivotal.github.com/jasmine/)
|
2012-03-13 17:29:42 +00:00
|
|
|
|
|
|
|
!SLIDE
|
2012-03-22 13:48:09 +00:00
|
|
|
## [johnbintz.github.com/tea-time](http://johnbintz.github.com/tea-time/)
|
2012-03-13 17:29:42 +00:00
|
|
|
|
|
|
|
!SLIDE
|
|
|
|
# Any questions?
|
|
|
|
|
|
|
|
!SLIDE
|
|
|
|
# Thank you!
|
|
|
|
## [@johnbintz](http://twitter.com/johnbintz/)
|
|
|
|
## [GitHub](http://github.com/johnbintz/)
|
|
|
|
|