jettest

package
v2.1.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestingSet = jet.NewSet(nil)

TestingSet holds a template set for running tests

Functions

func Run

func Run(t *testing.T, variables jet.VarMap, context interface{}, testName, testContent, testExpected string)

Run runs jet template engine test, template will be loaded and cached in the default set TestingSet

func RunWithSet

func RunWithSet(t *testing.T, set *jet.Set, variables jet.VarMap, context interface{}, testName, testContent, testExpected string)

RunWithSet like Run but accepts a jet.Set as a parameter to be used instead of the default set

func RunWithTemplate

func RunWithTemplate(t *testing.T, tt *jet.Template, variables jet.VarMap, context interface{}, testExpected string)

RunWithTemplate like Run but accepts a jet.Template

Types

This section is empty.

Jump to

Keyboard shortcuts

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