gomegahandler

package
v0.16.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	// GetActualFuncName returns the name of the gomega function, e.g. `Expect`
	GetActualFuncName(*ast.CallExpr) (string, bool)
	// ReplaceFunction replaces the function with another one, for fix suggestions
	ReplaceFunction(*ast.CallExpr, *ast.Ident)

	GetActualExpr(assertionFunc *ast.SelectorExpr) *ast.CallExpr
	// contains filtered or unexported methods
}

Handler provide different handling, depend on the way gomega was imported, whether in imported with "." name, custom name or without any name.

func GetGomegaHandler

func GetGomegaHandler(file *ast.File) Handler

GetGomegaHandler returns a gomegar handler according to the way gomega was imported in the specific file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL