xtst

module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: MIT

README

This repository is work in progress open sourcing libraries I've created during my time as a Go developer.

Go Report Card GoDoc Tests


Introduction to Ctx42 Testing Module

This repository marks the beginning of Ctx42 Testing Module, a collection of testing and assertion packages poised to help developers approach testing. As it develops, it will offer a comprehensive suite of tools designed to make testing more efficient, enjoyable, and integral to the development process.

Whether you're a seasoned tester or just starting out, tools in this module is being crafted to meet your needs, providing a solid foundation for ensuring code reliability in projects of all sizes.

Simplicity and Usability

At the heart of the module lies a commitment to minimalism and an exceptional developer experience (DX). By maintaining zero external dependencies, the framework stays lightweight and fast, free from the potential complexities and conflicts that third-party modules can introduce. Our documentation is being carefully designed to be thorough, clear, and packed with practical examples, empowering you to master the module with ease. Expect a great DX with features like a fluent, chainable API, descriptive error messages for quick debugging, all tailored to streamline your testing workflow.

Modular and Extensible Design

Xtst is built as a collection of modular, laser-focused packages, each targeting a specific aspect of testing. For instance, you might leverage the assert package for assertions, the mock and mocker packages for test doubles, or the tstkit package to keep your tests readable and minimalistic. The modularity lets you customize your testing setup to fit your project’s exact needs, avoiding unnecessary overhead. Beyond customization, the extensible architecture invites you to create your own test helpers ensuring.

Packages

  • Package dump provide configurable renderer of any type to a string.
  • Package must provide basic test helpers which panic on error.
  • Package notice helps to create nicely formated assertion messages.
  • Package tester provide facilities to test Test Helpers.

Click on the package link to see its README.md file with documentation. Each also package has an examples_test.go file with usage examples.

Directories

Path Synopsis
Package example provides usage examples for xtst module.
Package example provides usage examples for xtst module.
internal
affirm
Package affirm is an internal package that provides simple affirmation functions designed to improve readability and minimize boilerplate code in test cases by offering concise, semantically meaningful functions.
Package affirm is an internal package that provides simple affirmation functions designed to improve readability and minimize boilerplate code in test cases by offering concise, semantically meaningful functions.
types
Package types provides example types used in tests.
Package types provides example types used in tests.
pkg
dump
Package dump can render string representation of any type.
Package dump can render string representation of any type.
must
Package must provide a set of helper functions which panic on error.
Package must provide a set of helper functions which panic on error.
notice
Package notice simplifies building structured assertion messages.
Package notice simplifies building structured assertion messages.
tester
Package tester provides structures to help with testing custom assertions and test helpers.
Package tester provides structures to help with testing custom assertions and test helpers.

Jump to

Keyboard shortcuts

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