mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Use new addEqualityTester method to employ _.isEqual in specs
This commit is contained in:
@@ -65,15 +65,15 @@ window.keymap.bindKeys '*', 'meta-w': 'close'
|
||||
$(document).on 'close', -> window.close()
|
||||
$('html,body').css('overflow', 'auto')
|
||||
|
||||
jasmine.getEnv().addEqualityTester(_.isEqual) # Use underscore's definition of equality for toEqual assertions
|
||||
jasmine.getEnv().defaultTimeoutInterval = 1000
|
||||
|
||||
ensureNoPathSubscriptions = ->
|
||||
watchedPaths = $native.getWatchedPaths()
|
||||
$native.unwatchAllPaths()
|
||||
if watchedPaths.length > 0
|
||||
throw new Error("Leaking subscriptions for paths: " + watchedPaths.join(", "))
|
||||
|
||||
# Use underscore's definition of equality for toEqual assertions
|
||||
jasmine.Env.prototype.equals_ = _.isEqual
|
||||
|
||||
emitObject = jasmine.StringPrettyPrinter.prototype.emitObject
|
||||
jasmine.StringPrettyPrinter.prototype.emitObject = (obj) ->
|
||||
if obj.inspect
|
||||
@@ -85,8 +85,6 @@ jasmine.unspy = (object, methodName) ->
|
||||
throw new Error("Not a spy") unless object[methodName].originalValue?
|
||||
object[methodName] = object[methodName].originalValue
|
||||
|
||||
jasmine.getEnv().defaultTimeoutInterval = 1000
|
||||
|
||||
window.keyIdentifierForKey = (key) ->
|
||||
if key.length > 1 # named key
|
||||
key
|
||||
|
||||
Reference in New Issue
Block a user