Skip to content

Commit

Permalink
test(create-local-vue): add a failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinerey committed Feb 11, 2021
1 parent cfee9b5 commit be6a882
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/specs/create-local-vue.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,27 @@ describeWithShallowAndMount('createLocalVue', mountingMethod => {
}
}
)

// This test is related to the issue 1768.
// See: https://github.com/vuejs/vue-test-utils/issues/1768
itSkipIf(
process.env.TEST_ENV === 'browser' || vueVersion < 2.6,
'Does not exceed maximum call stack size when no custom error handler is defined',
async () => {
const { error } = global.console
const spy = jest.spyOn(global.console, 'error')
const localVue = createLocalVue()

try {
mountingMethod(ComponentWithSyncError, { localVue })
} catch {
const expected = expect.stringMatching(
/Maximum call stack size exceeded/
)

global.console.error = error
expect(spy).not.toHaveBeenCalledWith(expected)
}
}
)
})

0 comments on commit be6a882

Please sign in to comment.