@@ -2,6 +2,7 @@ import Vue from 'vue'
2
2
import Vuex from 'vuex'
3
3
import VueRouter from 'vue-router'
4
4
import { createLocalVue } from 'packages/test-utils/src'
5
+ import { mount } from 'packages/test-utils/src'
5
6
import Component from '~resources/components/component.vue'
6
7
import ComponentWithVuex from '~resources/components/component-with-vuex.vue'
7
8
import ComponentWithRouter from '~resources/components/component-with-router.vue'
@@ -232,3 +233,32 @@ describeWithShallowAndMount('createLocalVue', mountingMethod => {
232
233
}
233
234
)
234
235
} )
236
+
237
+ // TODO: Clean this up, it's only useful while debugging the issue.
238
+ describe . only ( 'Test' , ( ) => {
239
+ // When setting the array length value to `1`, then the issue disappears.
240
+ // However, when setting it to anything bigger, the issue appears.
241
+ const sets = Array . from ( { length : 2 } )
242
+
243
+ it . each ( sets ) (
244
+ // Note, the message may not be the final one, based on what I discover.
245
+ 'Does not exceed maximum call stack size when no custom error handler is defined' ,
246
+ ( ) => {
247
+ const { error } = global . console
248
+ const spy = jest . spyOn ( global . console , 'error' )
249
+ const localVue = createLocalVue ( )
250
+
251
+ try {
252
+ // TODO: Replace with mountingMethod.
253
+ mount ( ComponentWithSyncError , { localVue } )
254
+ } catch {
255
+ const expected = expect . stringMatching (
256
+ / M a x i m u m c a l l s t a c k s i z e e x c e e d e d /
257
+ )
258
+
259
+ global . console . error = error
260
+ expect ( spy ) . not . toHaveBeenCalledWith ( expected )
261
+ }
262
+ }
263
+ )
264
+ } )
0 commit comments