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
0
100
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
86
Blur the Lines: How to write web apps that look native.
robtarr
0
83
Responsive JavaScript
robtarr
4
950
Development Tools and Responsive JavaScript
robtarr
1
160
JavaScript App Development
robtarr
3
390
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
Into the Great Unknown - MozCon
thekraken
35
1.6k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
A designer walks into a library…
pauljervisheath
205
24k
The World Runs on Bad Software
bkeepers
PRO
67
11k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
12
960
Agile that works and the tools we love
rasmusluckow
328
21k
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