Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EXPECT_MODIFIER_NAMES = map[string]bool{ "not": true, "rejects": true, "resolves": true, }
View Source
var JEST_METHOD_NAMES = map[string]bool{ "afterAll": true, "afterEach": true, "beforeAll": true, "beforeEach": true, "describe": true, "expect": true, "fdescribe": true, "fit": true, "it": true, "jest": true, "test": true, "xdescribe": true, "xit": true, "xtest": true, }
View Source
var VALID_JEST_FN_CALL_CHAINS = map[string]bool{ "afterAll": true, "afterEach": true, "beforeAll": true, "beforeEach": true, "describe": true, "describe.each": true, "describe.only": true, "describe.only.each": true, "describe.skip": true, "describe.skip.each": true, "fdescribe": true, "fdescribe.each": true, "fit": true, "fit.each": true, "fit.failing": true, "fit.fails": true, "it": true, "it.concurrent": true, "it.concurrent.each": true, "it.concurrent.only.each": true, "it.concurrent.skip.each": true, "it.each": true, "it.failing": true, "it.fails": true, "it.only": true, "it.only.each": true, "it.only.failing": true, "it.only.fails": true, "it.skip": true, "it.skip.each": true, "it.skip.failing": true, "it.skip.fails": true, "it.todo": true, "test": true, "test.concurrent": true, "test.concurrent.each": true, "test.concurrent.only.each": true, "test.concurrent.skip.each": true, "test.each": true, "test.failing": true, "test.fails": true, "test.only": true, "test.only.each": true, "test.only.failing": true, "test.only.fails": true, "test.skip": true, "test.skip.each": true, "test.skip.failing": true, "test.skip.fails": true, "test.todo": true, "xdescribe": true, "xdescribe.each": true, "xit": true, "xit.each": true, "xit.failing": true, "xit.fails": true, "xtest": true, "xtest.each": true, "xtest.failing": true, "xtest.fails": true, }
Functions ¶
func GetMembersChain ¶
func GetMembersName ¶
func IsTypeOfJestFnCall ¶
func IsTypeOfJestFnCall(node *ast.Node, ctx rule.RuleContext, kinds ...JestFnType) bool
Types ¶
type JestFnType ¶
type JestFnType string
const ( JestFnTypeExpect JestFnType = "expect" JestFnTypeDescribe JestFnType = "describe" JestFnTypeHook JestFnType = "hook" JestFnTypeJest JestFnType = "jest" JestFnTypeTest JestFnType = "test" JestFnTypeUnknown JestFnType = "unknown" )
func GetJestKind ¶
func GetJestKind(name string) JestFnType
type ParsedJestFnCall ¶
type ParsedJestFnCall struct {
Name string
LocalName string
Kind JestFnType
Members []string
Modifiers []string
}
func ParseJestFnCall ¶
func ParseJestFnCall(node *ast.Node, ctx rule.RuleContext) *ParsedJestFnCall
Click to show internal directories.
Click to hide internal directories.