8000 Cleaner test output, enhanced filters. by adityamukho · Pull Request #16021 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Cleaner test output, enhanced filters. #16021

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Mar 31, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Enhanced testCase filter for arrays as well.
  • Loading branch information
Aditya Mukhopadhyay committed Mar 18, 2022
commit abbcb273836d9f122c82e291ceb980604e8cb24e
6 changes: 3 additions & 3 deletions js/common/modules/jsunity.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ jsUnity.results.endTeardownAll = function(index) {
TOTALTEARDOWNS += RESULTS.teardownAllDuration;
};

function MatchesTestFilter(suiteName, key) {
function matchesTestFilter(suiteName, key) {
if (testFilter === "undefined" || testFilter === undefined || testFilter === null) {
return true;
}
Expand All @@ -210,7 +210,7 @@ function MatchesTestFilter(suiteName, key) {
return suiteMatched && minimatch(key, testFilter);
}
if (Array.isArray(testFilter)) {
return testFilter.includes(key);
return testFilter.some(key => matchesTestFilter(suiteName, key));
}
return false;
}
Expand Down Expand Up @@ -253,7 +253,7 @@ function Run (testsuite) {

for (var key in definition) {
if (key.indexOf('test') === 0) {
if (!MatchesTestFilter(suite.suiteName, key)) {
if (!matchesTestFilter(suite.suiteName, key)) {
// print(`test "${key}" doesn't match "${testFilter}", skipping`);
nonMatchedTests.push(key);
continue;
Expand Down
0