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
91
Responsive JavaScript
robtarr
4
950
Development Tools and Responsive JavaScript
robtarr
1
170
JavaScript App Development
robtarr
3
390
Featured
See All Featured
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
130
Are puppies a ranking factor?
jonoalderson
1
3.2k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
82
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
490
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
290
Making Projects Easy
brettharned
120
6.6k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
We Have a Design System, Now What?
morganepeng
55
8k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
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