Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Frontend_Testing.pdf
Rob Tarr
July 25, 2014
More Decks by Rob Tarr
See All by Rob Tarr
Blur the Lines: Write Web Apps That Feel Native
robtarr
1
110
Blur The Lines - Native Feeling Web Apps
robtarr
0
95
Blur the Lines: How to write web apps that look native.
robtarr
0
100
Responsive JavaScript
robtarr
4
960
Development Tools and Responsive JavaScript
robtarr
1
180
JavaScript App Development
robtarr
3
400
Featured
See All Featured
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
630
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Deep Space Network (abreviated)
tonyrice
0
370
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
300
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2k
Between Models and Reality
mayunak
4
500
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Six Lessons from altMBA
skipperchong
29
4.5k
Ethics towards AI in product and experience design
skipperchong
2
430
Code Reviewing Like a Champion
maltzj
529
40k
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