Coveralls logob
Coveralls logo
  • Home
  • Features
  • Pricing
  • Docs
  • Sign In

Alorel / personal-build-tools / 1844

23 Dec 2019 - 1:17 coverage increased (+0.3%) to 78.737%
1844

Pull #180

travis-ci-com

9181eb84f9c35729a3bad740fb7f9d93?size=18&default=identiconweb-flow
chore(package): update lockfile yarn.lock
Pull Request #180: Update nyc to the latest version 🚀

382 of 627 branches covered (60.93%)

Branch coverage included in aggregate %.

1488 of 1748 relevant lines covered (85.13%)

37.36 hits per line

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

83.33
/src/fns/xSpawn.ts
1
import {SpawnSyncOptions, SpawnSyncOptionsWithStringEncoding, SpawnSyncReturns} from 'child_process';
2
import * as crossSpawn from 'cross-spawn';
8×
3
import {merge} from 'lodash';
8×
4
import {SafeResult} from '../interfaces/SafeResult';
8×
5

Branches [[0, 0]] missed.
6
export function xSpawnSync(cmd: string, args: string[] = [], opts: SpawnSyncOptions = {}): SpawnSyncReturns<string> {
808×
7
  const defaultOpts: SpawnSyncOptionsWithStringEncoding = {
8
    encoding: 'utf8',
9
    env: process.env,
10
    windowsHide: true
11
  };
808×
12

13
  return crossSpawn.sync(cmd, args, merge(defaultOpts, opts));
8×
14
}
15

752×
16
export function xSpawnSyncSafe(_cmd: string,
752×
17
                               _args?: string[],
18
                               _opts?: SpawnSyncOptions): SafeResult<SpawnSyncReturns<string>> {
19
  try {
20
    return {
21
      ok: true,
22
      //@ts-ignore
UNCOV
23
      result: xSpawnSync.apply(null, arguments)
!
24
    };
25
  } catch (e) {
26
    return {
27
      err: e,
28
      ok: false
29
    };
8×
30
  }
31
}
Troubleshooting · Open an Issue · Sales · Support · ENTERPRISE · CAREERS · STATUS
BLOG · TWITTER · Legal & Privacy · Supported CI Services · What's a CI service? · Automated Testing

© 2022 Coveralls, Inc