Add jasmine.attachToDOM

This commit is contained in:
Ben Ogle
2014-11-19 16:20:39 -08:00
parent 2cda86efda
commit 6bdbabecbd

View File

@@ -191,6 +191,10 @@ jasmine.unspy = (object, methodName) ->
throw new Error("Not a spy") unless object[methodName].hasOwnProperty('originalValue')
object[methodName] = object[methodName].originalValue
jasmine.attachToDOM = (element) ->
jasmineContent = document.querySelector('#jasmine-content')
jasmineContent.appendChild(element) unless jasmineContent.contains(element)
addCustomMatchers = (spec) ->
spec.addMatchers
toBeInstanceOf: (expected) ->