@@ -8,7 +8,7 @@ Vue.component("AbstractField", AbstractField);
88
99let el , vm , field ;
1010
11- function createField ( schema = { } , model = null , disabled = false , options ) {
11+ function createField ( test , schema = { } , model = null , disabled = false , options ) {
1212 el = document . createElement ( "div" ) ;
1313
1414 // eslint-disable-next-line quotes
@@ -29,7 +29,7 @@ function createField(schema = {}, model = null, disabled = false, options) {
2929 return [ el , vm ] ;
3030}
3131
32- describe ( "abstractField.vue" , ( ) => {
32+ describe ( "abstractField.vue" , function ( ) {
3333
3434 describe ( "check static value" , ( ) => {
3535 let schema = {
@@ -40,7 +40,7 @@ describe("abstractField.vue", () => {
4040 let model = { name : "John Doe" } ;
4141
4242 beforeEach ( ( ) => {
43- createField ( schema , model ) ;
43+ createField ( this , schema , model ) ;
4444 } ) ;
4545
4646 it ( "should give the model static value" , ( ) => {
@@ -66,7 +66,7 @@ describe("abstractField.vue", () => {
6666 let model = { } ;
6767
6868 beforeEach ( ( ) => {
69- createField ( schema , model ) ;
69+ createField ( this , schema , model ) ;
7070 } ) ;
7171
7272 it ( "should be called the schema.get function" , ( ) => {
@@ -94,7 +94,7 @@ describe("abstractField.vue", () => {
9494 let model = { name : "John Doe" } ;
9595
9696 beforeEach ( ( ) => {
97- createField ( schema , model ) ;
97+ createField ( this , schema , model ) ;
9898 field . formatValueToField = function ( value ) {
9999 return "**" + value + "**" ;
100100 } ;
@@ -125,7 +125,7 @@ describe("abstractField.vue", () => {
125125 let model = { name : "John Doe" } ;
126126
127127 beforeEach ( ( ) => {
128- createField ( schema , model ) ;
128+ createField ( this , schema , model ) ;
129129 } ) ;
130130
131131 it ( "should called once the schema.onChanged" , ( done ) => {
@@ -153,7 +153,7 @@ describe("abstractField.vue", () => {
153153 } ;
154154
155155 beforeEach ( ( ) => {
156- createField ( schema , model , false , options ) ;
156+ createField ( this , schema , model , false , options ) ;
157157 field . validate = sinon . spy ( ) ;
158158 } ) ;
159159
@@ -187,7 +187,7 @@ describe("abstractField.vue", () => {
187187 let model = { name : "John Doe" } ;
188188
189189 beforeEach ( ( ) => {
190- createField ( schema , model ) ;
190+ createField ( this , schema , model ) ;
191191 } ) ;
192192
193193 it ( "should call schema validator" , ( ) => {
@@ -210,7 +210,7 @@ describe("abstractField.vue", () => {
210210 let model = { name : "John Doe" } ;
211211
212212 beforeEach ( ( ) => {
213- createField ( schema , model , true ) ;
213+ createField ( this , schema , model , true ) ;
214214 } ) ;
215215
216216 it ( "should not call schema validator" , ( ) => {
@@ -233,7 +233,7 @@ describe("abstractField.vue", () => {
233233 let model = { name : "John Doe" } ;
234234
235235 beforeEach ( ( ) => {
236- createField ( schema , model ) ;
236+ createField ( this , schema , model ) ;
237237 } ) ;
238238
239239 it ( "should not call schema validator" , ( ) => {
@@ -257,7 +257,7 @@ describe("abstractField.vue", () => {
257257 let model = { name : "John Doe" } ;
258258
259259 beforeEach ( ( ) => {
260- createField ( schema , model ) ;
260+ createField ( this , schema , model ) ;
261261 } ) ;
262262
263263 it ( "should call schema validator" , ( ) => {
@@ -285,7 +285,7 @@ describe("abstractField.vue", () => {
285285 let model = { name : "John Doe" } ;
286286
287287 beforeEach ( ( ) => {
288- createField ( schema , model ) ;
288+ createField ( this , schema , model ) ;
289289 } ) ;
290290
291291 it ( "should called once the schema.onValidated" , ( ) => {
@@ -311,7 +311,7 @@ describe("abstractField.vue", () => {
311311 let model = { name : "John Doe" } ;
312312
313313 before ( ( ) => {
314- createField ( schema , model ) ;
314+ createField ( this , schema , model ) ;
315315 } ) ;
316316
317317 it ( "should be undefined" , ( ) => {
0 commit comments