Jasmine JavaScript Testing - Second Edition by Ragonha Paulo
Author:Ragonha, Paulo [Ragonha, Paulo]
Language: eng
Format: azw3
Publisher: Packt Publishing
Published: 2015-04-24T04:00:00+00:00
The important part in the preceding code is the $.getJSON call, an AJAX request expecting a JSON response containing an updated share price, such as:
{ "sharePrice": 20.18 }
By now, you can see that we are stuck; in order to run this spec, we will need a server running.
Setting up the scenario
Since this book is all about JavaScript, we are going to create a very simple Node.js server to be used by the specs. Node.js is a platform that allows the development of network applications, such as web servers, using JavaScript.
In Chapter 6, Light Speed Unit Testing, we are going to see alternative solutions to test AJAX requests without the need for a server. And in Chapter 8, Build Automation, we are going to see how to use Node.js as a foundation for an advanced build system.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7808)
Grails in Action by Glen Smith Peter Ledbrook(7719)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6442)
Kotlin in Action by Dmitry Jemerov(5089)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3944)
Mastering Azure Security by Mustafa Toroman and Tom Janetscheck(3355)
Learning React: Functional Web Development with React and Redux by Banks Alex & Porcello Eve(3101)
Mastering Bitcoin: Programming the Open Blockchain by Andreas M. Antonopoulos(2887)
The Art Of Deception by Kevin Mitnick(2621)
Drugs Unlimited by Mike Power(2478)
The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution by Walter Isaacson(2454)
A Blueprint for Production-Ready Web Applications: Leverage industry best practices to create complete web apps with Python, TypeScript, and AWS by Dr. Philip Jones(2422)
Kali Linux - An Ethical Hacker's Cookbook: End-to-end penetration testing solutions by Sharma Himanshu(2320)
Writing for the Web: Creating Compelling Web Content Using Words, Pictures and Sound (Eva Spring's Library) by Lynda Felder(2275)
SEO 2018: Learn search engine optimization with smart internet marketing strategies by Adam Clarke(2200)
JavaScript by Example by S Dani Akash(2152)
DarkMarket by Misha Glenny(2095)
Hands-On Cybersecurity with Blockchain by Rajneesh Gupta(2095)
Wireless Hacking 101 by Karina Astudillo(2091)
