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
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
87
Blur the Lines: How to write web apps that look native.
robtarr
0
86
Responsive JavaScript
robtarr
4
950
Development Tools and Responsive JavaScript
robtarr
1
160
JavaScript App Development
robtarr
3
390
Featured
See All Featured
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
2
170
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.3k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
190
55k
We Have a Design System, Now What?
morganepeng
53
7.8k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
116
20k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
22k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
2.9k
For a Future-Friendly Web
brad_frost
180
10k
Building Applications with DynamoDB
mza
96
6.7k
Building a Scalable Design System with Sketch
lauravandoore
463
33k
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