forked from CircuitVerse/CircuitVerse
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.setup.js
More file actions
28 lines (22 loc) · 726 Bytes
/
jest.setup.js
File metadata and controls
28 lines (22 loc) · 726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
* @jest-environment jsdom
*/
import Array from './simulator/src/arrayHelpers';
import 'codemirror/addon/hint/show-hint';
// This line makes "global.window" the same as "window"
global.window = window;
window.Jquery = require('jquery');
window.$ = require('jquery');
global.jQuery = require('jquery');
global.inputSpinner = require('bootstrap-input-spinner/src/bootstrap-input-spinner');
window.restrictedElements = [];
window.userSignedIn = true;
window.embed = false;
window.Array = Array;
const fs = require('fs');
const path = require('path');
const html = fs.readFileSync(
path.resolve(`${__dirname}/app/views/simulator/edit.html.erb`),
'utf8',
);
document.documentElement.innerHTML = html.toString();