package
0.0.0-20170928162525-58fa5b2d0b1e
Repository: https://github.com/ardanlabs/kit.git
Documentation: pkg.go.dev

# README

tests

import "github.com/ardanlabs/kit/tests"

Overview

Package tests provides the generic support all tests require.

Index

Package files

tests.go

Variables

var (
    Success = "\u2713"
    Failed  = "\u2717"
)

Success and failure markers.

var Logdash bytes.Buffer

Logdash is the central buffer where all logs are stored.

var TraceID = "Test"

TraceID provides a base trace id for tests.

func DisplayLog

func DisplayLog()

DisplayLog writes the Logdash data to standand out, if testing in verbose mode was turned on.

func IndentJSON

func IndentJSON(j string) string

IndentJSON takes a JSON payload as a string and re-indents it to make comparing expected strings to tests strings during testing.

func ResetLog

func ResetLog()

ResetLog resets the contents of Logdash.


Generated by godoc2md

# Functions

DisplayLog writes the Logdash data to standand out, if testing in verbose mode was turned on.
IndentJSON takes a JSON payload as a string and re-indents it to make comparing expected strings to tests strings during testing.
ResetLog resets the contents of Logdash.

# Variables

Success and failure markers.
Logdash is the central buffer where all logs are stored.
Success and failure markers.
TraceID provides a base trace id for tests.