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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Rob Tarr
July 25, 2014
0
110
Frontend_Testing.pdf
Rob Tarr
July 25, 2014
Tweet
Share
More Decks by Rob Tarr
See All by Rob Tarr
Blur the Lines: Write Web Apps That Feel Native
robtarr
1
100
Blur The Lines - Native Feeling Web Apps
robtarr
0
89
Blur the Lines: How to write web apps that look native.
robtarr
0
88
Responsive JavaScript
robtarr
4
950
Development Tools and Responsive JavaScript
robtarr
1
170
JavaScript App Development
robtarr
3
390
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
630
How to make the Groovebox
asonas
2
2k
Fireside Chat
paigeccino
42
3.8k
Building Applications with DynamoDB
mza
96
7k
Between Models and Reality
mayunak
2
230
Speed Design
sergeychernyshev
33
1.6k
Embracing the Ebb and Flow
colly
88
5k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
120
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
220
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.5k
Technical Leadership for Architectural Decision Making
baasie
3
280
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