Home / File/ ssr-stream.spec.ts — vue Source File

ssr-stream.spec.ts — vue Source File

Architecture documentation for ssr-stream.spec.ts, a typescript file in the vue codebase. 4 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  798598c1_c8af_9ea7_44e4_0787bc258e7d["ssr-stream.spec.ts"]
  956d7d9b_217a_5f25_93ba_c8cfdb8ce2c5["utils.ts"]
  798598c1_c8af_9ea7_44e4_0787bc258e7d --> 956d7d9b_217a_5f25_93ba_c8cfdb8ce2c5
  d432f199_b043_8a75_c1de_348fb2c2ba54["_it"]
  798598c1_c8af_9ea7_44e4_0787bc258e7d --> d432f199_b043_8a75_c1de_348fb2c2ba54
  c5601857_7faf_30c6_efca_20de90db006c["vue"]
  798598c1_c8af_9ea7_44e4_0787bc258e7d --> c5601857_7faf_30c6_efca_20de90db006c
  e470ee39_c7fb_5d09_8d77_4de2a23d9ce8["index"]
  798598c1_c8af_9ea7_44e4_0787bc258e7d --> e470ee39_c7fb_5d09_8d77_4de2a23d9ce8
  style 798598c1_c8af_9ea7_44e4_0787bc258e7d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// @vitest-environment node

import Vue from 'vue'
import { createRenderer } from 'server/index'
import { _it } from './utils'

const { renderToStream } = createRenderer()

describe('SSR: renderToStream', () => {
  _it('should render to a stream', done => {
    const stream = renderToStream(
      new Vue({
        template: `
        <div>
          <p class="hi">yoyo</p>
          <div id="ho" :class="[testClass, { red: isRed }]"></div>
          <span>{{ test }}</span>
          <input :value="test">
          <b-comp></b-comp>
          <c-comp></c-comp>
        </div>
      `,
        data: {
          test: 'hi',
          isRed: true,
          testClass: 'a'
        },
        components: {
          bComp(resolve) {
            return resolve({
              render(h) {
                return h('test-async-2')
              },
              components: {
                testAsync2(resolve) {
                  return resolve({
                    created() {
                      this.$parent.$parent.testClass = 'b'
                    },
                    render(h) {
                      return h(
                        'div',
                        { class: [this.$parent.$parent.testClass] },
                        'test'
                      )
                    }
                  })
                }
              }
            })
          },
          cComp: {
            render(h) {
              return h('div', { class: [this.$parent.testClass] }, 'test')
            }
          }
        }
      })
    )
    let res = ''
// ... (84 more lines)

Domain

Dependencies

Frequently Asked Questions

What does ssr-stream.spec.ts do?
ssr-stream.spec.ts is a source file in the vue codebase, written in typescript. It belongs to the CompilerSFC domain.
What does ssr-stream.spec.ts depend on?
ssr-stream.spec.ts imports 4 module(s): _it, index, utils.ts, vue.
Where is ssr-stream.spec.ts in the architecture?
ssr-stream.spec.ts is located at packages/server-renderer/test/ssr-stream.spec.ts (domain: CompilerSFC, directory: packages/server-renderer/test).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free