tests

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package tests implements a testing API for Hexya modules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeTests

func InitializeTests(moduleName string)

InitializeTests initializes a database for the tests of the given module. You probably want to use RunTests instead.

func RunTests

func RunTests(m *testing.M, moduleName string, preHookFnct func())

RunTests initializes the database, run the tests given by m and tears the database down.

It is meant to be used for modules testing. Initialize your module's tests with:

    import (
        "testing"
        "github.com/erlangs/okoo/src/tests"
    )

    func TestMain(m *testing.M) {
	       tests.RunTests(m, "my_module")
    }

func TearDownTests

func TearDownTests(moduleName string)

TearDownTests tears down the tests for the given module

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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