@@ -50,7 +50,7 @@ describe( 'CKEditor Component', () => {
50
50
51
51
wrapper . destroy ( ) ;
52
52
sinon . assert . calledOnce ( stub ) ;
53
- expect ( vm . instance ) . to . be . null ;
53
+ expect ( vm . $_instance ) . to . be . null ;
54
54
} ) ;
55
55
56
56
it ( 'should pass the editor promise rejection error to console#error()' , async ( ) => {
@@ -81,7 +81,7 @@ describe( 'CKEditor Component', () => {
81
81
await Vue . nextTick ( ) ;
82
82
83
83
expect ( vm . editor ) . to . equal ( MockEditor ) ;
84
- expect ( vm . instance ) . to . be . instanceOf ( MockEditor ) ;
84
+ expect ( vm . $_instance ) . to . be . instanceOf ( MockEditor ) ;
85
85
86
86
wrapper . destroy ( ) ;
87
87
} ) ;
@@ -100,8 +100,8 @@ describe( 'CKEditor Component', () => {
100
100
101
101
await Vue . nextTick ( ) ;
102
102
103
- expect ( vm . instance . config . initialData ) . to . equal ( 'foo' ) ;
104
- expect ( vm . instance . setDataCounter ) . to . equal ( 0 ) ;
103
+ expect ( vm . $_instance . config . initialData ) . to . equal ( 'foo' ) ;
104
+ expect ( vm . $_instance . setDataCounter ) . to . equal ( 0 ) ;
105
105
106
106
wrapper . destroy ( ) ;
107
107
} ) ;
@@ -135,7 +135,7 @@ describe( 'CKEditor Component', () => {
135
135
136
136
await Vue . nextTick ( ) ;
137
137
138
- expect ( vm . instance . isReadOnly ) . to . be . true ;
138
+ expect ( vm . $_instance . isReadOnly ) . to . be . true ;
139
139
wrapper . destroy ( ) ;
140
140
} ) ;
141
141
} ) ;
@@ -152,7 +152,7 @@ describe( 'CKEditor Component', () => {
152
152
153
153
await Vue . nextTick ( ) ;
154
154
155
- expect ( vm . instance . config ) . to . deep . equal ( { foo : 'bar' } ) ;
155
+ expect ( vm . $_instance . config ) . to . deep . equal ( { foo : 'bar' } ) ;
156
156
wrapper . destroy ( ) ;
157
157
} ) ;
158
158
@@ -206,7 +206,7 @@ describe( 'CKEditor Component', () => {
206
206
it ( '#instance should be defined' , async ( ) => {
207
207
await Vue . nextTick ( ) ;
208
208
209
- expect ( vm . instance ) . to . be . instanceOf ( MockEditor ) ;
209
+ expect ( vm . $_instance ) . to . be . instanceOf ( MockEditor ) ;
210
210
} ) ;
211
211
} ) ;
212
212
@@ -218,21 +218,21 @@ describe( 'CKEditor Component', () => {
218
218
219
219
await Vue . nextTick ( ) ;
220
220
221
- expect ( vm . instance . isReadOnly ) . to . be . true ;
221
+ expect ( vm . $_instance . isReadOnly ) . to . be . true ;
222
222
223
223
wrapper . setProps ( { disabled : false } ) ;
224
224
225
225
await Vue . nextTick ( ) ;
226
226
227
- expect ( vm . instance . isReadOnly ) . to . be . false ;
227
+ expect ( vm . $_instance . isReadOnly ) . to . be . false ;
228
228
229
229
wrapper . destroy ( ) ;
230
230
} ) ;
231
231
232
232
it ( '#value should trigger editor#setData' , async ( ) => {
233
233
await Vue . nextTick ( ) ;
234
234
235
- const spy = sandbox . spy ( vm . instance , 'setData' ) ;
235
+ const spy = sandbox . spy ( vm . $_instance , 'setData' ) ;
236
236
wrapper . setProps ( { value : 'foo' } ) ;
237
237
238
238
await Vue . nextTick ( ) ;
@@ -263,7 +263,7 @@ describe( 'CKEditor Component', () => {
263
263
await Vue . nextTick ( ) ;
264
264
265
265
expect ( wrapper . emitted ( ) . ready . length ) . to . equal ( 1 ) ;
266
- expect ( wrapper . emitted ( ) . ready [ 0 ] ) . to . deep . equal ( [ vm . instance ] ) ;
266
+ expect ( wrapper . emitted ( ) . ready [ 0 ] ) . to . deep . equal ( [ vm . $_instance ] ) ;
267
267
} ) ;
268
268
269
269
it ( 'should emit #destroy when the editor is destroyed' , async ( ) => {
@@ -274,7 +274,7 @@ describe( 'CKEditor Component', () => {
274
274
wrapper . destroy ( ) ;
275
275
276
276
expect ( wrapper . emitted ( ) . destroy . length ) . to . equal ( 1 ) ;
277
- expect ( wrapper . emitted ( ) . destroy [ 0 ] ) . to . deep . equal ( [ vm . instance ] ) ;
277
+ expect ( wrapper . emitted ( ) . destroy [ 0 ] ) . to . deep . equal ( [ vm . $_instance ] ) ;
278
278
} ) ;
279
279
280
280
describe ( '#input event' , ( ) => {
@@ -284,7 +284,7 @@ describe( 'CKEditor Component', () => {
284
284
285
285
await Vue . nextTick ( ) ;
286
286
287
- const on = vm . instance . model . document . on ;
287
+ const on = vm . $_instance . model . document . on ;
288
288
const evtStub = { } ;
289
289
290
290
expect ( on . calledOnce ) . to . be . true ;
@@ -299,7 +299,7 @@ describe( 'CKEditor Component', () => {
299
299
300
300
expect ( wrapper . emitted ( ) . input . length ) . to . equal ( 1 ) ;
301
301
expect ( wrapper . emitted ( ) . input [ 0 ] ) . to . deep . equal ( [
302
- 'foo' , evtStub , vm . instance
302
+ 'foo' , evtStub , vm . $_instance
303
303
] ) ;
304
304
} ) ;
305
305
@@ -310,7 +310,7 @@ describe( 'CKEditor Component', () => {
310
310
311
311
await Vue . nextTick ( ) ;
312
312
313
- const on = vm . instance . model . document . on ;
313
+ const on = vm . $_instance . model . document . on ;
314
314
const evtStub = { } ;
315
315
316
316
expect ( on . calledOnce ) . to . be . true ;
@@ -323,7 +323,7 @@ describe( 'CKEditor Component', () => {
323
323
324
324
expect ( wrapper . emitted ( ) . input . length ) . to . equal ( 1 ) ;
325
325
expect ( wrapper . emitted ( ) . input [ 0 ] ) . to . deep . equal ( [
326
- 'foo' , evtStub , vm . instance
326
+ 'foo' , evtStub , vm . $_instance
327
327
] ) ;
328
328
} ) ;
329
329
} ) ;
@@ -333,7 +333,7 @@ describe( 'CKEditor Component', () => {
333
333
334
334
await Vue . nextTick ( ) ;
335
335
336
- const on = vm . instance . editing . view . document . on ;
336
+ const on = vm . $_instance . editing . view . document . on ;
337
337
const evtStub = { } ;
338
338
339
339
expect ( on . calledTwice ) . to . be . true ;
@@ -346,7 +346,7 @@ describe( 'CKEditor Component', () => {
346
346
347
347
expect ( wrapper . emitted ( ) . focus . length ) . to . equal ( 1 ) ;
348
348
expect ( wrapper . emitted ( ) . focus [ 0 ] ) . to . deep . equal ( [
349
- evtStub , vm . instance
349
+ evtStub , vm . $_instance
350
350
] ) ;
351
351
} ) ;
352
352
@@ -355,7 +355,7 @@ describe( 'CKEditor Component', () => {
355
355
356
356
await Vue . nextTick ( ) ;
357
357
358
- const on = vm . instance . editing . view . document . on ;
358
+ const on = vm . $_instance . editing . view . document . on ;
359
359
const evtStub = { } ;
360
360
361
361
expect ( on . calledTwice ) . to . be . true ;
@@ -368,7 +368,7 @@ describe( 'CKEditor Component', () => {
368
368
369
369
expect ( wrapper . emitted ( ) . blur . length ) . to . equal ( 1 ) ;
370
370
expect ( wrapper . emitted ( ) . blur [ 0 ] ) . to . deep . equal ( [
371
- evtStub , vm . instance
371
+ evtStub , vm . $_instance
372
372
] ) ;
373
373
} ) ;
374
374
} ) ;
0 commit comments