@vangware/test
    TypeScript icon, indicating that this package has built-in type declarations

    7.1.8 • Public • Published

    Vangware's Test

    Build Status Coverage License NPM Version Open Issues

    Equality test with enforced legibility (based on RITEway and inspired by uvu).

    Usage

    Write:

    import { suite } from "@vangware/test";
    
    const add = (addend2: number) => (addend1: number) => addend1 + addend2;
    
    export default suite([
    	{
    		given: "a 1 and a 2",
    		must: "return 3",
    		received: add(2)(1),
    		wanted: 3
    	},
    	{
    		given: "a 1 and a -2",
    		must: "return -1",
    		received: add(-2)(1),
    		wanted: -1
    	}
    ])("Example suite name (optional)");

    Then run:

    @vangware/test

    If let's say the first test fails, the error reads something like this:

    [FAIL] Example suite name (optional)
    
    > Given a 1 and a 2, must return 3.
    
    Received: 4
    Wanted:   3
    

    Documentation

    Documentation can be found HERE. It is auto-generated with typedoc based on the JSDocs and the types in the source. Shouldn't be necessary to read this, code editors like VSCode integrate the documentation in the UI.

    Changelog

    Changelog can be found HERE.

    Test coverage

    Test coverage can be found HERE.

    Tip: Click on a version number to view a previous version's package page

    Current Tags

    • Version
      Downloads (Last 7 Days)
      • Tag
    • 7.1.8
      2
      • latest

    Version History

    Install

    npm i @vangware/test

    DownloadsWeekly Downloads

    15

    Version

    7.1.8

    License

    MIT

    Unpacked Size

    77.4 kB

    Total Files

    175

    Last publish

    Collaborators

    • lukeshiru