• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vuepress / vuepress-next / 5519673118

pending completion
5519673118

push

github

web-flow
fix(client): avoid mismatching between route path and page data (close #1249) (#1361)

Co-authored-by: meteorlxy <meteor.lxy@foxmail.com>

336 of 479 branches covered (70.15%)

Branch coverage included in aggregate %.

691 of 1009 relevant lines covered (68.48%)

45.09 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

6.67
/packages/utils/src/withSpinner.ts
1
import process from 'node:process'
2
import ora, { type Ora } from 'ora'
3
import { formatMs } from './formatMs.js'
4

5
export const withSpinner =
6
  (msg: string) =>
41✔
7
  async <T>(target: (spinner?: Ora) => Promise<T>): Promise<T> => {
×
8
    if (process.env.DEBUG) {
×
9
      return target()
×
10
    }
11

12
    const start = Date.now()
×
13
    const spinner = ora()
×
14
    try {
×
15
      spinner.start(msg)
×
16
      const result = await target(spinner)
×
17
      spinner.succeed(`${msg} - done in ${formatMs(Date.now() - start)}`)
×
18
      return result
×
19
    } catch (e) {
20
      spinner.fail(`${msg} - failed in ${formatMs(Date.now() - start)}`)
×
21
      throw e
×
22
    }
23
  }
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc