Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Frontend_Testing.pdf
Search
Rob Tarr
July 25, 2014
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Frontend_Testing.pdf
Rob Tarr
July 25, 2014
More Decks by Rob Tarr
See All by Rob Tarr
Blur the Lines: Write Web Apps That Feel Native
robtarr
1
110
Blur The Lines - Native Feeling Web Apps
robtarr
0
95
Blur the Lines: How to write web apps that look native.
robtarr
0
99
Responsive JavaScript
robtarr
4
960
Development Tools and Responsive JavaScript
robtarr
1
170
JavaScript App Development
robtarr
3
400
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
500
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Done Done
chrislema
186
16k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
300
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Between Models and Reality
mayunak
4
420
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Transcript
Rob Tarr - @robtarr Ryan Cromwell - @cromwellryan ! Frontend
Testing
Why should I test my JavaScript?
Why should I test my JavaScript? ‣ Stories ‣ Pain
Points
Writing Tests With
describe "Bowling", ->! it "should score a 14", ->! frames
= [ new Frame(3, 4), new Frame(3, 4) ]! game = new BowlingGame(frames)! expect(game.getTotalScore()).toEqual 14!
Automating Tests With Grunt
module.exports = (grunt) ->! grunt.config "jasmine",! src: "dist/js/app.js"! options:! specs:
"specs/js/*Spec.js"! helpers: "specs/js/*Helper.js"! vendor: ["jquery.min.js", "specs/lib/*.js"]! ! grunt.loadNpmTasks "grunt-contrib-jasmine"!
Adding Tests to an Existing Codebase
Refactoring jQuery
AJAX && Promises
Coding for Better Tests
THANKS! @robtarr @cromwellryan