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
88
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
From π to Pie charts
rasagy
0
120
Are puppies a ranking factor?
jonoalderson
1
2.6k
The Cost Of JavaScript in 2023
addyosmani
55
9.4k
Rails Girls Zürich Keynote
gr2m
96
14k
The Curious Case for Waylosing
cassininazir
0
220
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
86
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
220
A better future with KSS
kneath
240
18k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
HDC tutorial
michielstock
1
330
The World Runs on Bad Software
bkeepers
PRO
72
12k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
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