Skip to content

Commit 755a0c9

Browse files
yyx990803kiku-jw
authored andcommitted
test: add a test case for ssr max stack size limit
1 parent 2574c13 commit 755a0c9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/ssr/ssr-string.spec.js

+18
Original file line numberDiff line numberDiff line change
@@ -1541,6 +1541,24 @@ describe('SSR: renderToString', () => {
15411541
done()
15421542
})
15431543
})
1544+
1545+
it('handling max stack size limit', done => {
1546+
const vueInstance = new Vue({
1547+
template: `<div class="root">
1548+
<child v-for="(x, i) in items" :key="i"></child>
1549+
</div>`,
1550+
components: {
1551+
child: {
1552+
template: '<div class="child"><span class="child">hi</span></div>'
1553+
}
1554+
},
1555+
data: {
1556+
items: Array(1000).fill(0)
1557+
}
1558+
})
1559+
1560+
renderToString(vueInstance, err => done(err))
1561+
})
15441562
})
15451563

15461564
function renderVmWithOptions (options, cb) {

0 commit comments

Comments
 (0)