I am trying to run my mocha tests with PhantomJS (through grunt-mocha). The first test throws a ReferenceError: Can't find variable: HTMLSpanElement
, while the second one tests fine. In Chrome, both of these tests pass. Any ideas on why this might not be working?
This throws 'ReferenceError: Can't find variable: HTMLSpanElement'
:
it 'Instance of Span', ->
$el = $('<span></span>')
expect($el[0]).to.be.an.instanceof(HTMLSpanElement);
This test passes:
it 'Instance of Element', ->
$el = $('<span></span>')
expect($el[0]).to.be.an.instanceof(HTMLElement);