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
How STYLIGHT went responsive
nonsquared
100
6k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
62
Navigating Team Friction
lara
192
16k
KATA
mclloyd
PRO
34
15k
Designing Powerful Visuals for Engaging Learning
tmiket
0
220
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
730
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
77
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
79
How to train your dragon (web standard)
notwaldorf
97
6.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
The Curse of the Amulet
leimatthew05
1
8.3k
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
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