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 characters
/* | |
* Checks to items to see if they are equal in terms of value. For primitives | |
* that's easy with one exception, but reference types are harder. | |
* | |
* For the purposes of this gist I've defined equality for reference types as | |
* follows: | |
* | |
* Regexes, dates, and functions are equal if their string representations are | |
* equal. | |
* WeakMaps, WeakSets, and Generators are equal only if they are referentially |
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 characters
var tester = require('promises-aplus-tests'); | |
var jq = require('jquery'); | |
var jsdom = require('jsdom'); | |
jsdom.env('<p></p>', function(err, window) { | |
if (err != null) { | |
throw err; | |
} else { | |
var $ = jq(window); | |
var arg = { | |
deferred: $.Deferred |