@@ -8,7 +8,7 @@ Vue.component("AbstractField", AbstractField);
8
8
9
9
let el , vm , field ;
10
10
11
- function createField ( schema = { } , model = null , disabled = false , options ) {
11
+ function createField ( test , schema = { } , model = null , disabled = false , options ) {
12
12
el = document . createElement ( "div" ) ;
13
13
14
14
// eslint-disable-next-line quotes
@@ -29,7 +29,7 @@ function createField(schema = {}, model = null, disabled = false, options) {
29
29
return [ el , vm ] ;
30
30
}
31
31
32
- describe ( "abstractField.vue" , ( ) => {
32
+ describe ( "abstractField.vue" , function ( ) {
33
33
34
34
describe ( "check static value" , ( ) => {
35
35
let schema = {
@@ -40,7 +40,7 @@ describe("abstractField.vue", () => {
40
40
let model = { name : "John Doe" } ;
41
41
42
42
beforeEach ( ( ) => {
43
- createField ( schema , model ) ;
43
+ createField ( this , schema , model ) ;
44
44
} ) ;
45
45
46
46
it ( "should give the model static value" , ( ) => {
@@ -66,7 +66,7 @@ describe("abstractField.vue", () => {
66
66
let model = { } ;
67
67
68
68
beforeEach ( ( ) => {
69
- createField ( schema , model ) ;
69
+ createField ( this , schema , model ) ;
70
70
} ) ;
71
71
72
72
it ( "should be called the schema.get function" , ( ) => {
@@ -94,7 +94,7 @@ describe("abstractField.vue", () => {
94
94
let model = { name : "John Doe" } ;
95
95
96
96
beforeEach ( ( ) => {
97
- createField ( schema , model ) ;
97
+ createField ( this , schema , model ) ;
98
98
field . formatValueToField = function ( value ) {
99
99
return "**" + value + "**" ;
100
100
} ;
@@ -125,7 +125,7 @@ describe("abstractField.vue", () => {
125
125
let model = { name : "John Doe" } ;
126
126
127
127
beforeEach ( ( ) => {
128
- createField ( schema , model ) ;
128
+ createField ( this , schema , model ) ;
129
129
} ) ;
130
130
131
131
it ( "should called once the schema.onChanged" , ( done ) => {
@@ -153,7 +153,7 @@ describe("abstractField.vue", () => {
153
153
} ;
154
154
155
155
beforeEach ( ( ) => {
156
- createField ( schema , model , false , options ) ;
156
+ createField ( this , schema , model , false , options ) ;
157
157
field . validate = sinon . spy ( ) ;
158
158
} ) ;
159
159
@@ -187,7 +187,7 @@ describe("abstractField.vue", () => {
187
187
let model = { name : "John Doe" } ;
188
188
189
189
beforeEach ( ( ) => {
190
- createField ( schema , model ) ;
190
+ createField ( this , schema , model ) ;
191
191
} ) ;
192
192
193
193
it ( "should call schema validator" , ( ) => {
@@ -210,7 +210,7 @@ describe("abstractField.vue", () => {
210
210
let model = { name : "John Doe" } ;
211
211
212
212
beforeEach ( ( ) => {
213
- createField ( schema , model , true ) ;
213
+ createField ( this , schema , model , true ) ;
214
214
} ) ;
215
215
216
216
it ( "should not call schema validator" , ( ) => {
@@ -233,7 +233,7 @@ describe("abstractField.vue", () => {
233
233
let model = { name : "John Doe" } ;
234
234
235
235
beforeEach ( ( ) => {
236
- createField ( schema , model ) ;
236
+ createField ( this , schema , model ) ;
237
237
} ) ;
238
238
239
239
it ( "should not call schema validator" , ( ) => {
@@ -257,7 +257,7 @@ describe("abstractField.vue", () => {
257
257
let model = { name : "John Doe" } ;
258
258
259
259
beforeEach ( ( ) => {
260
- createField ( schema , model ) ;
260
+ createField ( this , schema , model ) ;
261
261
} ) ;
262
262
263
263
it ( "should call schema validator" , ( ) => {
@@ -285,7 +285,7 @@ describe("abstractField.vue", () => {
285
285
let model = { name : "John Doe" } ;
286
286
287
287
beforeEach ( ( ) => {
288
- createField ( schema , model ) ;
288
+ createField ( this , schema , model ) ;
289
289
} ) ;
290
290
291
291
it ( "should called once the schema.onValidated" , ( ) => {
@@ -311,7 +311,7 @@ describe("abstractField.vue", () => {
311
311
let model = { name : "John Doe" } ;
312
312
313
313
before ( ( ) => {
314
- createField ( schema , model ) ;
314
+ createField ( this , schema , model ) ;
315
315
} ) ;
316
316
317
317
it ( "should be undefined" , ( ) => {
0 commit comments