File tree Expand file tree Collapse file tree 5 files changed +17
-4
lines changed Expand file tree Collapse file tree 5 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 21
21
displayName : ' npm install and build'
22
22
23
23
- script : |
24
- npm run test
24
+ npm run test -- --watchAll=false
25
25
displayName : ' run unit tests'
Original file line number Diff line number Diff line change 29
29
" not dead" ,
30
30
" not ie <= 11" ,
31
31
" not op_mini all"
32
- ]
32
+ ],
33
+ "devDependencies" : {
34
+ "jest-canvas-mock" : " ^2.3.1"
35
+ }
33
36
}
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import ReactDOM from 'react-dom' ;
3
+ import "jest-canvas-mock" ;
4
+
5
+ jest . mock ( 'mapbox-gl/dist/mapbox-gl' , ( ) => ( {
6
+ Map : ( ) => ( { } ) ,
7
+ } ) ) ;
8
+
3
9
import App from './App' ;
4
10
5
11
it ( 'renders without crashing' , ( ) => {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import "bootstrap-slider/dist/css/bootstrap-slider.css";
11
11
import "jquery-bar-rating/dist/themes/css-stars.css" ;
12
12
13
13
import $ from "jquery" ;
14
- import "jquery-ui/ui/widgets/datepicker.js" ;
14
+ // import "jquery-ui/ui/widgets/datepicker.js";
15
15
import "select2/dist/js/select2.js" ;
16
16
import "jquery-bar-rating" ;
17
17
@@ -21,6 +21,7 @@ import { json } from "./survey_json.js";
21
21
22
22
//import "icheck/skins/square/blue.css";
23
23
window [ "$" ] = window [ "jQuery" ] = $ ;
24
+ require ( "jquery-ui/ui/widgets/datepicker.js" ) ;
24
25
//require("icheck");
25
26
26
27
export { MyQuestion } from "./MyQuestion" ;
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import "jquery-bar-rating/dist/themes/css-stars.css";
12
12
import "jquery-bar-rating/dist/themes/fontawesome-stars.css" ;
13
13
14
14
import $ from "jquery" ;
15
- import "jquery-ui/ui/widgets/datepicker.js" ;
15
+ // import "jquery-ui/ui/widgets/datepicker.js";
16
16
import "select2/dist/js/select2.js" ;
17
17
import "jquery-bar-rating" ;
18
18
@@ -21,6 +21,9 @@ import "pretty-checkbox/dist/pretty-checkbox.css";
21
21
22
22
import * as widgets from "surveyjs-widgets" ;
23
23
24
+ window [ "$" ] = window [ "jQuery" ] = $ ;
25
+ require ( "jquery-ui/ui/widgets/datepicker.js" ) ;
26
+
24
27
SurveyJSCreator . StylesManager . applyTheme ( "default" ) ;
25
28
26
29
//widgets.icheck(SurveyKo, $);
You can’t perform that action at this time.
0 commit comments