test

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package test provides common functions for testing.

Index

Constants

This section is empty.

Variables

View Source
var UpdateOut = flag.Bool("update", false, "Update the example files in test/data and test/data/out")

UpdateOut is a flag that can be set to update example files

Functions

func LoadEnvelope

func LoadEnvelope(file string) *gobl.Envelope

LoadEnvelope loads a test file from the test/data folder as a GOBL envelope and will rebuild it if necessary to ensure any changes are accounted for.

func LoadInvoice

func LoadInvoice(name string) *bill.Invoice

LoadInvoice grabs the gobl envelope and attempts to extract the invoice payload

func Path

func Path(elements ...string) string

Path joins the provided elements to the project root

func RootPath

func RootPath() string

RootPath returns the project root, regardless of current working directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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