Skip to content

Commit

Permalink
test: add a test case for ssr max stack size limit
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Feb 28, 2019
1 parent 571a488 commit 38825ff
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/ssr/ssr-string.spec.js
Expand Up @@ -1541,6 +1541,24 @@ describe('SSR: renderToString', () => {
done()
})
})

it('handling max stack size limit', done => {
const vueInstance = new Vue({
template: `<div class="root">
<child v-for="(x, i) in items" :key="i"></child>
</div>`,
components: {
child: {
template: '<div class="child"><span class="child">hi</span></div>'
}
},
data: {
items: Array(1000).fill(0)
}
})

renderToString(vueInstance, err => done(err))
})
})

function renderVmWithOptions (options, cb) {
Expand Down

0 comments on commit 38825ff

Please sign in to comment.