mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-24 01:10:31 +01:00
Update jsdom
This commit is contained in:
@@ -109,7 +109,7 @@
|
|||||||
"grunt": "^1.0.1",
|
"grunt": "^1.0.1",
|
||||||
"grunt-contrib-watch": "^1.0.0",
|
"grunt-contrib-watch": "^1.0.0",
|
||||||
"istanbul": "^0.4.2",
|
"istanbul": "^0.4.2",
|
||||||
"jsdom": "9.12.0",
|
"jsdom": "^11.2.0",
|
||||||
"mocha": "^3.5.0",
|
"mocha": "^3.5.0",
|
||||||
"mocha-lcov-reporter": "^1.2.0",
|
"mocha-lcov-reporter": "^1.2.0",
|
||||||
"xmlhttprequest": "1.8.0",
|
"xmlhttprequest": "1.8.0",
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
|
|
||||||
|
|
||||||
var assert = require('assert');
|
var assert = require('assert');
|
||||||
var jsdom = require('jsdom');
|
var JSDOM = require('jsdom').JSDOM;
|
||||||
var utils = require('./../public/src/utils.js');
|
var utils = require('./../public/src/utils.js');
|
||||||
|
|
||||||
|
|
||||||
describe('Utility Methods', function () {
|
describe('Utility Methods', function () {
|
||||||
// https://gist.github.com/robballou/9ee108758dc5e0e2d028
|
// https://gist.github.com/robballou/9ee108758dc5e0e2d028
|
||||||
// create some jsdom magic to allow jQuery to work
|
// create some jsdom magic to allow jQuery to work
|
||||||
var doc = jsdom.jsdom('<html><body></body></html>');
|
var dom = new JSDOM('<html><body></body></html>');
|
||||||
var window = doc.defaultView;
|
var window = dom.window;
|
||||||
global.jQuery = require('jquery')(window);
|
global.jQuery = require('jquery')(window);
|
||||||
global.$ = global.jQuery;
|
global.$ = global.jQuery;
|
||||||
var $ = global.$;
|
var $ = global.$;
|
||||||
global.window = doc.defaultView;
|
global.window = window;
|
||||||
|
|
||||||
it('should preserve case if requested', function (done) {
|
it('should preserve case if requested', function (done) {
|
||||||
var slug = utils.slugify('UPPER CASE', true);
|
var slug = utils.slugify('UPPER CASE', true);
|
||||||
|
|||||||
Reference in New Issue
Block a user