Documentation ¶
Overview ¶
Package grep implements functions to parse and filter spec files by cypress-grep expressions.
See https://www.npmjs.com/package/@cypress/grep for details on the specific syntax of cypress-grep expressions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type All ¶
type All struct {
Expressions []Expression
}
All represents a composite expression that evaluates to true if all child expressions evaluate to true.
type Any ¶
type Any struct {
Expressions []Expression
}
Any represents a composite expression that evaluates to true if any child expression evaluates to true.
type Exact ¶
Exact represents an expression that wraps a string to be matched and evalutates to true if that string is an exact substring of the input.
type Expression ¶
type Expression interface { // Eval evaluates the Expression against the input string. Eval(input string) bool }
Expression is an interface that represents a logical statement.
func ParseGrepTagsExp ¶
func ParseGrepTagsExp(expr string) Expression
ParseGrepTagsExp parses a cypress-grep tag expression.
The returned Expression can be used to evaluate whether a given string can match the expression.
func ParseGrepTitleExp ¶
func ParseGrepTitleExp(expr string) Expression
ParseGrepTitleExp parses a cypress-grep expression and returns an Expression.
The returned Expression can be used to evaluate whether a given string can match the expression.