JavaScript Testing with Jasmine: JavaScript Behavior-Driven Development
By Evan Hahn
2.5/5
()
Currently unavailable
Currently unavailable
About this ebook
Get a concise introduction to Jasmine, the popular behavior-driven testing framework for JavaScript. This practical guide shows you how to write unit tests with Jasmine that automatically check for bugs in your application. If you have JavaScript experience—with knowledge of some advanced features—you’ll learn how to write specifications for individual components, and then use those specs to test the code you write.
Throughout the book, author Evan Hahn focuses primarily on methods for testing browser-based JavaScript applications, but you’ll also discover how to use Jasmine with CoffeeScript, Node.js, Ruby on Rails, and Ruby without Rails. You won’t find a more in-depth source for Jasmine anywhere.
- Get an overview of both test-driven and behavior-driven development
- Write useful specs by determining what you need to test—and what you don’t
- Test the behavior of new and existing code against the specs you create
- Apply Jasmine matchers and discover how to build your own
- Organize code suites into groups and subgroups as your code becomes more complex
- Use a Jasmine spy in place of a function or an object—and learn why it’s valuable
Evan Hahn
Evan Hahn is an active member of the Node and Express community and contributes to many open source JavaScript projects.
Related to JavaScript Testing with Jasmine
Related ebooks
Master Math, Grade 5: Introductory Algebra Rating: 0 out of 5 stars0 ratingsCalculus DeMYSTiFieD, Second Edition Rating: 3 out of 5 stars3/5Nature Explorers Adjustable Pocket Chart Activities Rating: 0 out of 5 stars0 ratingsPHP Programming Solutions Rating: 0 out of 5 stars0 ratingsWriting Well Grade 5: A Guide for Proper Writing Technique Rating: 5 out of 5 stars5/5Turn eBay Data into Dollars Rating: 4 out of 5 stars4/5Complete Audio Mastering: Practical Techniques Rating: 5 out of 5 stars5/5McGraw-Hill's PMP Certification Mathematics Rating: 0 out of 5 stars0 ratingsHow to Start and Run an eBay Consignment Business Rating: 0 out of 5 stars0 ratingsGED Test 5-Hour Quick Prep For Dummies Rating: 0 out of 5 stars0 ratingsCelebrate Learning Adjustable Pocket Chart Activities Rating: 0 out of 5 stars0 ratingsThe Ultimate Small Business Marketing Toolkit: All the Tips, Forms, and Strategies You'll Ever Need! Rating: 3 out of 5 stars3/5Programming the Intel Galileo: Getting Started with the Arduino -Compatible Development Board Rating: 5 out of 5 stars5/5OKRs For Dummies Rating: 0 out of 5 stars0 ratingsThe Boundaries Bible - The Antidote to Burnout Rating: 0 out of 5 stars0 ratingsYour First Sailboat, Second Edition Rating: 3 out of 5 stars3/5Breakthrough Improvement with QI Macros and Excel: Finding the Invisible Low-Hanging Fruit: Finding the Invisible Low-Hanging Fruit Rating: 0 out of 5 stars0 ratingsFast Ideas for Busy Teachers: Math, Grade 5 Rating: 0 out of 5 stars0 ratingsInstant Cashflow Rating: 5 out of 5 stars5/5Reading Comprehension Practice, Grades 7 - 8 Rating: 5 out of 5 stars5/5McGraw-Hill's SAT 2400! Rating: 0 out of 5 stars0 ratingsDevelopment Research in Practice: The DIME Analytics Data Handbook Rating: 0 out of 5 stars0 ratingsMicrosoft SQL Server 2005: A Beginner''s Guide Rating: 0 out of 5 stars0 ratingsA Mathematics Course for Political and Social Research Rating: 5 out of 5 stars5/5Reading Comprehension Practice, Grade 6 Rating: 4 out of 5 stars4/5GRE 5-Hour Quick Prep For Dummies Rating: 0 out of 5 stars0 ratingsGreening Your Home: Sustainable Options for Every System In Your House Rating: 4 out of 5 stars4/5Intrusion Detection Honeypots Rating: 3 out of 5 stars3/5Spelling, Grade 3: Strengthening Basic Skills with Jokes, Comics, and Riddles Rating: 0 out of 5 stars0 ratingsExcel VBA Macro Programming Rating: 0 out of 5 stars0 ratings
Internet & Web For You
Coding For Dummies Rating: 5 out of 5 stars5/5Get Rich or Lie Trying: Ambition and Deceit in the New Influencer Economy Rating: 0 out of 5 stars0 ratingsGrokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5Six Figure Blogging Blueprint Rating: 5 out of 5 stars5/5How to Be Invisible: Protect Your Home, Your Children, Your Assets, and Your Life Rating: 4 out of 5 stars4/5No Place to Hide: Edward Snowden, the NSA, and the U.S. Surveillance State Rating: 4 out of 5 stars4/5How to Disappear and Live Off the Grid: A CIA Insider's Guide Rating: 0 out of 5 stars0 ratingsMore Porn - Faster!: 50 Tips & Tools for Faster and More Efficient Porn Browsing Rating: 3 out of 5 stars3/5Podcasting For Dummies Rating: 4 out of 5 stars4/5The Beginner's Affiliate Marketing Blueprint Rating: 4 out of 5 stars4/5The Logo Brainstorm Book: A Comprehensive Guide for Exploring Design Directions Rating: 4 out of 5 stars4/5Social Engineering: The Science of Human Hacking Rating: 3 out of 5 stars3/5Remote/WebCam Notarization : Basic Understanding Rating: 3 out of 5 stars3/5Wireless Hacking 101 Rating: 4 out of 5 stars4/5Everybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are Rating: 4 out of 5 stars4/5The Hacker Crackdown: Law and Disorder on the Electronic Frontier Rating: 4 out of 5 stars4/5Cybersecurity For Dummies Rating: 4 out of 5 stars4/5How To Start A Profitable Authority Blog In Under One Hour Rating: 5 out of 5 stars5/5How To Make Money Blogging: How I Replaced My Day-Job With My Blog and How You Can Start A Blog Today Rating: 4 out of 5 stars4/5The Digital Marketing Handbook: A Step-By-Step Guide to Creating Websites That Sell Rating: 5 out of 5 stars5/5The Gothic Novel Collection Rating: 5 out of 5 stars5/5How To Start A Podcast Rating: 4 out of 5 stars4/5Stop Asking Questions: How to Lead High-Impact Interviews and Learn Anything from Anyone Rating: 5 out of 5 stars5/5Beginner's Guide To Starting An Etsy Print-On-Demand Shop Rating: 0 out of 5 stars0 ratings
Reviews for JavaScript Testing with Jasmine
3 ratings1 review
- Rating: 3 out of 5 stars3/5You should know right away: this book is short, 41 pages, stem to stern.Jasmine is a free-and-open-source JavaScript testing application developed by Pivotal Labs and available on GitHub.After some brief why-you-should-do-this throat-clearing, Hahn walks the reader through the development of a few simple JavaScript functions and the Jasmine “suites” for testing them. He starts from the very beginning, getting and installing the software and setting up the environment. He explains every line of code and describes additional features and options of the application along the way and includes very clear instructions for writing and running the test code.With no experience testing JavaScript and only a little experience writing any software tests, this book was exactly the jump-start I needed. I duplicated the sample code in my IDE, goofed around with it a little bit, breaking it and extending it to see what happened and then was quickly able to start unit tests in my current project. Not well, at first, but with some confidence that I'd be able to figure things out.The prose can get clunky. Not unclear or incoherent, just lacking in grace, and there is one serious code error, already noted in the errata page for the book at O'Reilly Media. Hahn makes no mention of the active community of developers using and extending Jasmine nor of Jasmine's shortcomings (it's not good at testing DOM manipulations without an additional plugin) – this is very much “How To Get Started With Jasmine”.Minus “why you should test your software” arguments and some enthusiastic coverage of CoffeeScript and Ruby, you're left with something roughly equivalent to a high-quality Web tutorial. That's nothing to sneeze at, but it's not “The Definitive Guide”, either.