Skip to content

Commit d144caa

Browse files
clydindgp1130
authored andcommitted
test: use yargs-parser in E2E test suite runner
The `minimist` package that was previously used is no longer a dependency of the project and was only working due to package hoisting.
1 parent bf15b20 commit d144caa

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/legacy-cli/e2e_runner.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { logging } from '@angular-devkit/core';
44
import { createConsoleLogger } from '@angular-devkit/core/node';
55
import * as colors from 'ansi-colors';
66
import glob from 'glob';
7-
import minimist from 'minimist';
7+
import yargsParser from 'yargs-parser';
88
import * as path from 'path';
99
import { setGlobalVariable } from './e2e/utils/env';
1010
import { gitClean } from './e2e/utils/git';
@@ -25,7 +25,6 @@ Error.stackTraceLimit = Infinity;
2525
* --ng-tag=TAG Use a specific tag for build snapshots. Similar to ng-snapshots but point to a
2626
* tag instead of using the latest master.
2727
* --ng-snapshots Install angular snapshot builds in the test project.
28-
* --ve Use the View Engine compiler.
2928
* --glob Run tests matching this glob pattern (relative to tests/e2e/).
3029
* --ignore Ignore tests matching this glob pattern.
3130
* --reuse=/path Use a path instead of create a new project. That project should have been
@@ -38,9 +37,13 @@ Error.stackTraceLimit = Infinity;
3837
* --tmpdir=path Override temporary directory to use for new projects.
3938
* If unnamed flags are passed in, the list of tests will be filtered to include only those passed.
4039
*/
41-
const argv = minimist(process.argv.slice(2), {
40+
const argv = yargsParser(process.argv.slice(2), {
4241
boolean: ['debug', 'ng-snapshots', 'noglobal', 'nosilent', 'noproject', 'verbose'],
4342
string: ['devkit', 'glob', 'ignore', 'reuse', 'ng-tag', 'tmpdir', 'ng-version'],
43+
configuration: {
44+
'dot-notation': false,
45+
'camel-case-expansion': false,
46+
},
4447
});
4548

4649
/**
@@ -93,7 +96,7 @@ const tests = allTests.filter((name) => {
9396

9497
return argv._.some((argName) => {
9598
return (
96-
path.join(process.cwd(), argName) == path.join(__dirname, 'e2e', name) ||
99+
path.join(process.cwd(), argName + '') == path.join(__dirname, 'e2e', name) ||
97100
argName == name ||
98101
argName == name.replace(/\.ts$/, '')
99102
);

0 commit comments

Comments
 (0)