-
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
287 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Predicates, type Predicate } from 'vest-utils'; | ||
import { TIsolate, VestRuntime, Walker } from 'vestjs-runtime'; | ||
|
||
import { CommonStates } from 'CommonStateMachine'; | ||
import { TIsolateTest } from 'IsolateTest'; | ||
import { TFieldName } from 'SuiteResultTypes'; | ||
import { VestTest } from 'VestTest'; | ||
import { matchesOrHasNoFieldName } from 'matchingFieldName'; | ||
|
||
export class SuiteWalker { | ||
static defaultRoot = VestRuntime.useAvailableRoot; | ||
|
||
static hasPending(predicate?: Predicate): boolean { | ||
const root = SuiteWalker.defaultRoot(); | ||
|
||
if (!root) { | ||
return false; | ||
} | ||
|
||
return Walker.some(root, (isolate: TIsolate) => { | ||
return ( | ||
(isolate.status === CommonStates.PENDING && predicate?.(isolate)) ?? | ||
true | ||
); | ||
}); | ||
} | ||
|
||
static hasRemainingTests(fieldName?: TFieldName): boolean { | ||
return SuiteWalker.hasPending( | ||
Predicates.all(VestTest.is, (testObject: TIsolateTest) => { | ||
return matchesOrHasNoFieldName(VestTest.getData(testObject), fieldName); | ||
}) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
da2cce3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
vest-next – ./website
vest-next-git-latest-ealush.vercel.app
vest-website.vercel.app
vest-next-ealush.vercel.app
vest-next.vercel.app
da2cce3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
vest – ./website
vest-git-latest-ealush.vercel.app
vest.vercel.app
vestjs.dev
vest-ealush.vercel.app
www.vestjs.dev