jsheet-plus
Version:
Jspreadsheet-plus is an enhanced lightweight, vanilla javascript plugin to create amazing web-based interactive data grids with spreadsheet like controls compatible with Excel, Google Spreadsheets and any other spreadsheet software.
24 lines (19 loc) • 604 B
JavaScript
require('jsdom-global')(undefined, { url: 'https://localhost' });
// Mock window.confirm and alert for tests
global.confirm = () => true;
global.window.confirm = () => true;
global.alert = () => {};
global.window.alert = () => {};
global.root = document.createElement('div');
global.root.style.width = '100%';
global.root.style.height = '100%';
global.root.innerHTML = ''
document.body.appendChild(global.root);
exports.mochaHooks = {
afterEach(done) {
// destroy datagrid component
global.root.innerHTML = ''
done();
},
};