Last active
March 22, 2017 17:45
Revisions
-
chrisfosterelli revised this gist
Nov 20, 2015 . 1 changed file with 31 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,37 @@ ========== Welcome back! At the end of each test, call me over and I'll give you some quick feedback! Step 1: Open the Jasmine documentation, you'll need it! : http://jasmine.github.io/2.3/introduction.html Step 2: Create a test suite and Javascript file to make an HTTP : request to the following url -> https://cors-test.appspot.com/test : Your tests must be asynchronous! You can use jQuery requests. Step 3: Create a test suite that tests the following code below. : Both functions are part of one file (therefore one module). : Your test must use two nested describes to test each function individually. : You must test that the first function calls the second (use a stub!) var myObject = { change: function(num) { return num * 10 * -1; } }; function myFunc(num) { return num * myObject.change(num); } Step 4: Add a test to your last suite that tests the functions behaviour : when passed unexpected values (strings, null, undefined). : These tests should fail, so fix the code so that they don't! Step 5: Create a function that returns after 3600 seconds. : Write a test for this! There is a way to do this so that : you don't need to wait an hour (clock manipulation), so you should : use that. ...and you're done! -
chrisfosterelli created this gist
Nov 20, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ WORKSHOP 2 ========== Welcome back! Step 1: Open the Jasmine documentation, you'll need it! : http://jasmine.github.io/2.3/introduction.html