function loadPatterns() {
  return fs.readdirSync(FIXTURE_ROOT).map((name) => {
    const code0 = fs.readFileSync(
      path.join(FIXTURE_ROOT, name, 'source.vue'),
      'utf8'
    )
    const code = code0.replace(
      /^<!--(.+?)-->/,
      `<test-name>${name}</test-name>`
    )
    const option = JSON.parse(/^<!--(.+?)-->/.exec(code0)[1])
    return { code, name, option }
  })
}
Load test patterns from fixtures.

@returns {object} The loaded patterns.