upgrade jsdom to newest version so contextify is no longer required, add travis
This commit is contained in:
4
.travis.yml
Normal file
4
.travis.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
language: node_js
|
||||||
|
node_js:
|
||||||
|
- "6"
|
||||||
|
script: npm run build
|
||||||
@@ -235,7 +235,7 @@ describe('ZabbixDatasource', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('When quering alerts', () => {
|
describe('When querying alerts', () => {
|
||||||
let options = {};
|
let options = {};
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|||||||
10
dist/datasource-zabbix/specs/test-main.js
vendored
10
dist/datasource-zabbix/specs/test-main.js
vendored
@@ -2,7 +2,7 @@
|
|||||||
/* globals global: false */
|
/* globals global: false */
|
||||||
|
|
||||||
import prunk from 'prunk';
|
import prunk from 'prunk';
|
||||||
import {jsdom} from 'jsdom';
|
import {JSDOM} from 'jsdom';
|
||||||
import chai from 'chai';
|
import chai from 'chai';
|
||||||
// import sinon from 'sinon';
|
// import sinon from 'sinon';
|
||||||
import sinonChai from 'sinon-chai';
|
import sinonChai from 'sinon-chai';
|
||||||
@@ -35,11 +35,11 @@ prunk.mock('app/core/utils/datemath', datemathMock);
|
|||||||
prunk.mock('angular', angularMocks);
|
prunk.mock('angular', angularMocks);
|
||||||
prunk.mock('jquery', 'module not found');
|
prunk.mock('jquery', 'module not found');
|
||||||
|
|
||||||
// Setup jsdom
|
|
||||||
// Required for loading angularjs
|
// Required for loading angularjs
|
||||||
global.document = jsdom('<html><head><script></script></head><body></body></html>');
|
let dom = new JSDOM('<html><head><script></script></head><body></body></html>');
|
||||||
global.window = global.document.parentWindow;
|
// Setup jsdom
|
||||||
global.navigator = window.navigator = {};
|
global.window = dom.window;
|
||||||
|
global.document = global.window.document;
|
||||||
global.Node = window.Node;
|
global.Node = window.Node;
|
||||||
|
|
||||||
// Setup Chai
|
// Setup Chai
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ describe('ZabbixDatasource', function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('When quering alerts', function () {
|
describe('When querying alerts', function () {
|
||||||
var options = {};
|
var options = {};
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
|
|||||||
@@ -52,11 +52,11 @@ _prunk2.default.mock('app/core/utils/datemath', datemathMock);
|
|||||||
_prunk2.default.mock('angular', angularMocks);
|
_prunk2.default.mock('angular', angularMocks);
|
||||||
_prunk2.default.mock('jquery', 'module not found');
|
_prunk2.default.mock('jquery', 'module not found');
|
||||||
|
|
||||||
// Setup jsdom
|
|
||||||
// Required for loading angularjs
|
// Required for loading angularjs
|
||||||
global.document = (0, _jsdom.jsdom)('<html><head><script></script></head><body></body></html>');
|
var dom = new _jsdom.JSDOM('<html><head><script></script></head><body></body></html>');
|
||||||
global.window = global.document.parentWindow;
|
// Setup jsdom
|
||||||
global.navigator = window.navigator = {};
|
global.window = dom.window;
|
||||||
|
global.document = global.window.document;
|
||||||
global.Node = window.Node;
|
global.Node = window.Node;
|
||||||
|
|
||||||
// Setup Chai
|
// Setup Chai
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
"grunt-sass": "^1.1.0",
|
"grunt-sass": "^1.1.0",
|
||||||
"grunt-systemjs-builder": "^0.2.5",
|
"grunt-systemjs-builder": "^0.2.5",
|
||||||
"grunt": "~0.4.5",
|
"grunt": "~0.4.5",
|
||||||
"jsdom": "~3.1.2",
|
"jsdom": "~11.3.0",
|
||||||
"jshint-stylish": "^2.1.0",
|
"jshint-stylish": "^2.1.0",
|
||||||
"load-grunt-tasks": "~3.2.0",
|
"load-grunt-tasks": "~3.2.0",
|
||||||
"mocha": "^2.4.5",
|
"mocha": "^2.4.5",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/* globals global: false */
|
/* globals global: false */
|
||||||
|
|
||||||
import prunk from 'prunk';
|
import prunk from 'prunk';
|
||||||
import {jsdom} from 'jsdom';
|
import {JSDOM} from 'jsdom';
|
||||||
import chai from 'chai';
|
import chai from 'chai';
|
||||||
// import sinon from 'sinon';
|
// import sinon from 'sinon';
|
||||||
import sinonChai from 'sinon-chai';
|
import sinonChai from 'sinon-chai';
|
||||||
@@ -35,11 +35,11 @@ prunk.mock('app/core/utils/datemath', datemathMock);
|
|||||||
prunk.mock('angular', angularMocks);
|
prunk.mock('angular', angularMocks);
|
||||||
prunk.mock('jquery', 'module not found');
|
prunk.mock('jquery', 'module not found');
|
||||||
|
|
||||||
// Setup jsdom
|
|
||||||
// Required for loading angularjs
|
// Required for loading angularjs
|
||||||
global.document = jsdom('<html><head><script></script></head><body></body></html>');
|
let dom = new JSDOM('<html><head><script></script></head><body></body></html>');
|
||||||
global.window = global.document.parentWindow;
|
// Setup jsdom
|
||||||
global.navigator = window.navigator = {};
|
global.window = dom.window;
|
||||||
|
global.document = global.window.document;
|
||||||
global.Node = window.Node;
|
global.Node = window.Node;
|
||||||
|
|
||||||
// Setup Chai
|
// Setup Chai
|
||||||
|
|||||||
Reference in New Issue
Block a user