UNPKG

mocha-jsdom

Version:

Simple integration of jsdom into mocha tests

18 lines (13 loc) 384 B
/* global it, history, describe, location, expect */ var jsdom = require('../index') describe('simple', function () { jsdom() it('has document', function () { var div = document.createElement('div') expect(div.nodeName).eql('DIV') }) it('has history', function () { history.pushState({}, 'abc', '#/a/b/c') expect(location.href).match(/\/a\/b\/c$/) }) })