File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 1
1
module . exports = {
2
- setupFiles : [ './jest.setup.js' ] ,
2
+ testEnvironment : 'jsdom' ,
3
+
4
+ // To Ensure the environment is ready before running jest.setup.js
5
+ setupFilesAfterEnv : [ './jest.setup.js' ] ,
6
+
7
+ // Only match test files in simulator/spec/ outside of cv-frontend-vue
3
8
testMatch : [ '**/simulator/spec/**/*.spec.js' ] ,
9
+
10
+ // Explicitly ignore the cv-frontend-vue folder so Jest doesn’t pick up
11
+ // ES module or Vitest tests from that sub-project
12
+ testPathIgnorePatterns : [ '<rootDir>/cv-frontend-vue/' ] ,
13
+
4
14
maxWorkers : '50%' ,
5
15
verbose : true ,
16
+
6
17
moduleNameMapper : {
7
18
'\\.(css|less|sass|scss)$' : 'identity-obj-proxy' ,
8
19
'typeface-nunito' : 'identity-obj-proxy' ,
Original file line number Diff line number Diff line change 3
3
*/
4
4
5
5
import Array from './simulator/src/arrayHelpers' ;
6
- import 'codemirror/addon/hint/show-hint.js ' ;
6
+ import 'codemirror/addon/hint/show-hint' ;
7
7
8
+ // This line makes "global.window" the same as "window"
8
9
global . window = window ;
10
+
9
11
window . Jquery = require ( 'jquery' ) ;
10
12
window . $ = require ( 'jquery' ) ;
11
13
global . jQuery = require ( 'jquery' ) ;
@@ -19,5 +21,8 @@ window.Array = Array;
19
21
const fs = require ( 'fs' ) ;
20
22
const path = require ( 'path' ) ;
21
23
22
- const html = fs . readFileSync ( path . resolve ( `${ __dirname } /app/views/simulator/edit.html.erb` ) , 'utf8' ) ;
24
+ const html = fs . readFileSync (
25
+ path . resolve ( `${ __dirname } /app/views/simulator/edit.html.erb` ) ,
26
+ 'utf8' ,
27
+ ) ;
23
28
document . documentElement . innerHTML = html . toString ( ) ;
You can’t perform that action at this time.
0 commit comments