chore: add no-debugger eslint rule (#5906)

This commit is contained in:
Cédric Exbrayat
2022-05-13 01:10:00 +02:00
committed by GitHub
parent 8a123ac34f
commit 9ecee16f89
9 changed files with 23 additions and 29 deletions

View File

@@ -15,8 +15,7 @@ describe('createApp for dom', () => {
// #4398
test('should not mutate original root component options object', () => {
const originalObj = {
const originalObj = {
data() {
return {
counter: 0
@@ -28,17 +27,16 @@ describe('createApp for dom', () => {
expect(msg).toMatch(`Component is missing template or render function`)
})
const Root = { ...originalObj}
const Root = { ...originalObj }
const app = createApp(Root)
app.config.warnHandler = handler
app.mount(document.createElement('div'))
// ensure mount is based on a copy of Root object rather than Root object itself
app.mount(document.createElement('div'))
// ensure mount is based on a copy of Root object rather than Root object itself
expect(app._component).not.toBe(Root)
// ensure no mutation happened to Root object
expect(originalObj).toMatchObject(Root)
})
})