Procházet zdrojové kódy

test: add a test case for ssr max stack size limit

Evan You před 7 roky
rodič
revize
38825ff675
1 změnil soubory, kde provedl 18 přidání a 0 odebrání
  1. 18 0
      test/ssr/ssr-string.spec.js

+ 18 - 0
test/ssr/ssr-string.spec.js

@@ -1541,6 +1541,24 @@ describe('SSR: renderToString', () => {
       done()
       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) {
 function renderVmWithOptions (options, cb) {