@brillout/test-e2e 0.5.26 → 0.5.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -34,7 +34,7 @@ function tolerateErrorBuiltIn({ logSource, logText }) {
|
|
|
34
34
|
logText: 'The service was stopped: write EPIPE',
|
|
35
35
|
logSource: 'stderr',
|
|
36
36
|
},
|
|
37
|
-
/* Ignore Chrome logging warning when it cannot do its creepy tracking: https://stackoverflow.com/questions/69619035/error-with-permissions-policy-header-unrecognized-feature-interest-cohort
|
|
37
|
+
/* Ignore Chrome logging warning when it cannot do its creepy tracking: https://stackoverflow.com/questions/69619035/error-with-permissions-policy-header-unrecognized-feature-interest-cohort
|
|
38
38
|
```
|
|
39
39
|
[15:57:20.273][/test/abort/test-dev-server.test.ts][npm run dev:server][Browser Warning] {
|
|
40
40
|
"type": "warning",
|
package/dist/findTestFiles.js
CHANGED
|
@@ -6,14 +6,19 @@ const parallel_ci_1 = require("./parallel-ci");
|
|
|
6
6
|
// Unit tests `**/*.spec.*` are handled by Vitest
|
|
7
7
|
const testFilenamePattern = '**/*.test.ts';
|
|
8
8
|
async function findTestFiles(findFilter) {
|
|
9
|
+
const testFilesAll = await findTestFilesAll();
|
|
10
|
+
const testFiles = (0, utils_1.filterFiles)(testFilesAll, findFilter);
|
|
11
|
+
return testFiles;
|
|
12
|
+
}
|
|
13
|
+
exports.findTestFiles = findTestFiles;
|
|
14
|
+
async function findTestFilesAll() {
|
|
9
15
|
{
|
|
10
16
|
const testFiles = (0, parallel_ci_1.getTestFilesForCurrentJob)();
|
|
11
17
|
if (testFiles)
|
|
12
18
|
return testFiles;
|
|
13
19
|
}
|
|
14
20
|
{
|
|
15
|
-
const testFiles = (0, utils_1.findFiles)(testFilenamePattern
|
|
21
|
+
const testFiles = (0, utils_1.findFiles)(testFilenamePattern);
|
|
16
22
|
return testFiles;
|
|
17
23
|
}
|
|
18
24
|
}
|
|
19
|
-
exports.findTestFiles = findTestFiles;
|
package/dist/utils/cliOptions.js
CHANGED
|
@@ -7,10 +7,8 @@ const verbose = (0, parseCli_1.check)('--verbose');
|
|
|
7
7
|
const inspect = (0, parseCli_1.check)('--inspect');
|
|
8
8
|
const debugEsbuild = (0, parseCli_1.check)('--debug-esbuild');
|
|
9
9
|
const bail = (0, parseCli_1.check)('--bail');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const exclude = check('--exclude')
|
|
13
|
-
*/
|
|
10
|
+
// Defined & used in ./findFiles.ts
|
|
11
|
+
const exclude = (0, parseCli_1.check)('--exclude');
|
|
14
12
|
(0, parseCli_1.validate)();
|
|
15
13
|
const cliOptions = {
|
|
16
14
|
verbose,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export { findFiles };
|
|
2
2
|
export { findFilesParseCliArgs };
|
|
3
|
+
export { filterFiles };
|
|
3
4
|
export type { FindFilter };
|
|
4
5
|
declare type FindFilter = {
|
|
5
6
|
terms: string[];
|
|
6
7
|
exclude: boolean;
|
|
7
8
|
};
|
|
8
|
-
declare function findFiles(pattern: string
|
|
9
|
+
declare function findFiles(pattern: string): Promise<string[]>;
|
|
10
|
+
declare function filterFiles(files: string[], findFilter: null | FindFilter): string[];
|
|
9
11
|
declare function findFilesParseCliArgs(): null | FindFilter;
|
package/dist/utils/findFiles.js
CHANGED
|
@@ -3,20 +3,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.findFilesParseCliArgs = exports.findFiles = void 0;
|
|
6
|
+
exports.filterFiles = exports.findFilesParseCliArgs = exports.findFiles = void 0;
|
|
7
7
|
const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const runCommandShortLived_1 = require("./runCommandShortLived");
|
|
10
10
|
const cwd = process.cwd();
|
|
11
11
|
let gitFiles;
|
|
12
|
-
async function findFiles(pattern
|
|
13
|
-
let files = (await (0, fast_glob_1.default)([pattern], { ignore: ['**/node_modules/**', '**/.git/**'], cwd, dot: true }))
|
|
14
|
-
.filter((filePathRelative) => applyFilter(filePathRelative, findFilter))
|
|
15
|
-
.map((filePathRelative) => path_1.default.join(cwd, filePathRelative));
|
|
12
|
+
async function findFiles(pattern) {
|
|
13
|
+
let files = (await (0, fast_glob_1.default)([pattern], { ignore: ['**/node_modules/**', '**/.git/**'], cwd, dot: true })).map((filePathRelative) => path_1.default.join(cwd, filePathRelative));
|
|
16
14
|
files = await filterGitIgnoredFiles(files);
|
|
17
15
|
return files;
|
|
18
16
|
}
|
|
19
17
|
exports.findFiles = findFiles;
|
|
18
|
+
function filterFiles(files, findFilter) {
|
|
19
|
+
return files
|
|
20
|
+
.map((p) => path_1.default.relative(cwd, p))
|
|
21
|
+
.filter((filePathRelative) => applyFilter(filePathRelative, findFilter))
|
|
22
|
+
.map((p) => path_1.default.join(cwd, p));
|
|
23
|
+
}
|
|
24
|
+
exports.filterFiles = filterFiles;
|
|
20
25
|
async function filterGitIgnoredFiles(files) {
|
|
21
26
|
if (!gitFiles) {
|
|
22
27
|
const stdout1 = await (0, runCommandShortLived_1.runCommandShortLived)('git ls-files', { cwd });
|