UNPKG

@natlibfi/melinda-merge-ui-commons

Version:
72 lines (58 loc) 2.76 kB
'use strict'; var _jsdom = require('jsdom'); var _chai = require('chai'); var _chai2 = _interopRequireDefault(_chai); var _chaiImmutable = require('chai-immutable'); var _chaiImmutable2 = _interopRequireDefault(_chaiImmutable); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _ref = new _jsdom.JSDOM('<!doctype html><html><body></body></html>', { url: 'https://foo.bar' }), window = _ref.window; /** * * @licstart The following is the entire license notice for the JavaScript code in this file. * * Common modules for Melinda UI applications * * Copyright (C) 2015-2019 University Of Helsinki (The National Library Of Finland) * * This file is part of melinda-ui-commons * * melinda-ui-commons program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * melinda-ui-commons is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * @licend The above is the entire license notice * for the JavaScript code in this file. * */ var document = window.document; global.document = document; global.window = window; global.__DEV__ = true; global.window.$ = require('jquery'); Object.keys(window).forEach(function (key) { if (!(key in global)) { global[key] = window[key]; } }); _chai2.default.use(_chaiImmutable2.default); document.createRange = function () { return { setEnd: function setEnd() {}, setStart: function setStart() {}, getBoundingClientRect: function getBoundingClientRect() { return { right: 0 }; } }; }; //# sourceMappingURL=test_bootstrap.js.map