Atlas › Test
parser.mjs|title=should expose yargs-parser as Parser|occurrence=1
Exact test identity: mocha:v1|namespace=yargs@4153e0f097aeaf43a71a2530db6dda51dff2c544:main|file=test/parser.mjs|title=should expose yargs-parser as Parser|occurrence=1
- Package
mocha:v1|namespace=yargs@4153e0f097aeaf43a71a2530db6dda51dff2c544:main|file=test
- Suite / test hierarchy
parser.mjs|title=should expose yargs-parser as Parser|occurrence=1
- Test
parser.mjs|title=should expose yargs-parser as Parser|occurrence=1
- Introduced at
- apply-extends.ts ×4 Frontier kind: Joint frontier
- Covered ranges
- 11
- Covered lines
- 26
- Covered files
- 3
Co-introduced tests
1 other test enter at the same concept.
Covered source
Expand a file to inspect source; the > gutter marks covered lines.
lib/utils/process-argv.ts 13 covered LOC · 5 ranges
Open complete file
8
return 1;
9
}
11
function isBundledElectronApp() {
12
// process.defaultApp is either set by electron in an electron unbundled app, or undefined
14
return isElectronApp() && !(process as ElectronProcess).defaultApp;
15
}
17
function isElectronApp() {
18
// process.versions.electron is either set by electron, or undefined
20
return !!(process as ElectronProcess).versions.electron;
21
}
23
>
export function hideBin(argv: string[]) {
24
return argv.slice(getProcessArgvBinIndex() + 1);
25
}
27
>
export function getProcessArgvBin() {
28
return process.argv[getProcessArgvBinIndex()];
29
}
31
>
interface ElectronProcess extends NodeJS.Process {
32
>
defaultApp?: boolean;
33
>
versions: NodeJS.ProcessVersions & {
34
>
electron: string;
35
>
};
36
>
}
lib/utils/apply-extends.ts 9 covered LOC · 4 ranges
Open complete file
1
>
import {Dictionary, PlatformShim} from '../typings/common-types.js';
apply-extends.ts
2
>
import {YError} from '../yerror.js';
3
>
4
>
let previouslyVisitedConfigs: string[] = [];
5
>
let shim: PlatformShim;
6
>
export function applyExtends(
7
config: Dictionary,
8
cwd: string,
51
: Object.assign({}, defaultConfig, config);
52
}
54
function checkForCircularExtends(cfgPath: string) {
55
if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) {
57
}
58
}
60
function getPathToDefaultConfig(cwd: string, pathToExtend: string) {
61
return shim.path.resolve(cwd, pathToExtend);
62
}
64
function mergeDeep(config1: Dictionary, config2: Dictionary) {
65
const target: Dictionary = {};
lib/yerror.ts 4 covered LOC · 2 ranges
Open complete file
1
>
export class YError extends Error {
yerror.ts
2
>
name = 'YError';
3
>
constructor(msg?: string | null) {
4
super(msg || 'yargs error');
5
if (Error.captureStackTrace) {