e2ed
Version:
E2E testing framework over Playwright
25 lines (24 loc) • 1.09 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.collectTestFilePaths = void 0;
const node_path_1 = require("node:path");
const globby_1 = __importDefault(require("globby"));
const internal_1 = require("../../constants/internal");
const config_1 = require("../config");
/**
* Collects all test file paths for current pack by test file globs
* (includes tests that will be filtered by the `filterTestsIntoPack` function).
* @internal
*/
const collectTestFilePaths = async () => {
const { testFileGlobs } = (0, config_1.getFullPackConfig)();
const rawTestFilesPaths = await (0, globby_1.default)(testFileGlobs);
const testFilesPaths = rawTestFilesPaths
.map(node_path_1.normalize)
.filter((testFilePath) => testFilePath.startsWith(internal_1.TESTS_DIRECTORY_PATH) && !testFilePath.endsWith('.skip.ts'));
return testFilesPaths;
};
exports.collectTestFilePaths = collectTestFilePaths;