UNPKG

@mmisty/cypress-grep

Version:

Filters tests by tags/title using substring or regular expressions (can find dynamic tags)

66 lines (65 loc) 2.29 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isTrue = exports.grepEnvVars = void 0; var grepEnvVars; (function (grepEnvVars) { /** * Expression for filtering tests * Will search trough tags / test title and all suite titles for the test */ grepEnvVars["GREP"] = "GREP"; /** * Session number to not have conflicts with all_tests files and filtered results */ grepEnvVars["GREP_SESSION"] = "GREP_SESSION"; /** * Whether to fail run when no tests are found, default true */ grepEnvVars["failOnNotFound"] = "GREP_failOnNotFound"; /** * Add UI control to filter test (only for interactive mode), default true */ grepEnvVars["addControlToUI"] = "GREP_addControlToUI"; /** * Show tags in test title, default true */ grepEnvVars["showTagsInTitle"] = "GREP_showTagsInTitle"; /** * Show excluded tests as pending, default true */ grepEnvVars["showExcludedTests"] = "GREP_showExcludedTests"; /** * Whether to run tests in prefilter mode,default false */ grepEnvVars["GREP_PRE_FILTER"] = "GREP_PRE_FILTER"; /** * Will be used to create file with all tests * When not set will be determined automatically depending on spec pattern */ grepEnvVars["GREP_TESTS_FOLDER"] = "GREP_TESTS_FOLDER"; /** * Will be used for filename with all tests * Should be file name that doesn't match regular spec pattern (ex. doesn't have '*.cy.ts'/'*.test.ts' extensions) * Default 'all-tests.ts' */ grepEnvVars["GREP_ALL_TESTS_NAME"] = "GREP_ALL_TESTS_NAME"; /** * Will be used to write result when prefilter mode * When prefiter is false will use tests from this file to run * Default `${config.projectRoot}/filtered_test_paths.json` */ grepEnvVars["GREP_RESULTS_FILE"] = "GREP_RESULTS_FILE"; /** * Whether to delete all tests file after prefilter * default true */ grepEnvVars["GREP_DELETE_ALL_FILE"] = "GREP_DELETE_ALL_FILE"; })(grepEnvVars || (exports.grepEnvVars = grepEnvVars = {})); /** * Check value equals true or 'true' * @param val */ const isTrue = (val) => { return val === 'true' || val === true; }; exports.isTrue = isTrue;