UNPKG

@mh-code/angular-unit-test-runner

Version:

Runs unit test for a specific angular project or for all projects.

14 lines (13 loc) 677 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.angularTestOptions = void 0; // --test is for the unit tests till autRunner Options are implemented const autRunnerOptions = ['--test']; const getCliOptionsFromProcessArgs = () => process.argv.slice(2); const splitOptionName = (option) => option.split('=')[0]?.trim(); const splitOptionValue = (option) => option.split('=')[1]?.trim(); const angularTestOptions = () => { const options = getCliOptionsFromProcessArgs(); return options.filter((option) => !autRunnerOptions.some((autOption) => autOption === splitOptionName(option))); }; exports.angularTestOptions = angularTestOptions;