Home / Function/ assertCode() — vue Function Reference

assertCode() — vue Function Reference

Architecture documentation for the assertCode() function in util.ts from the vue codebase.

Entity Profile

Relationship Graph

Source Code

packages/compiler-sfc/test/util.ts lines 23–35

export function assertCode(code: string) {
  // parse the generated code to make sure it is valid
  try {
    babelParse(code, {
      sourceType: 'module',
      plugins: ['typescript']
    })
  } catch (e: any) {
    console.log(code)
    throw e
  }
  expect(code).toMatchSnapshot()
}

Domain

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free