Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
180
JavaScript App Development
robtarr
3
400
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
528
40k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
4 Signs Your Business is Dying
shpigford
187
23k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
290
Docker and Python
trallard
47
4.2k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
540
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Color Theory Basics | Prateek | Gurzu
gurzu
1
470
Balancing Empowerment & Direction
lara
6
1.3k
Visualization
eitanlees
153
17k
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