npm promotes metadefinitions

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

    8.0.4 • 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.

      This feature is exclusive to Teams

      Illustration of wombats

      The package file explorer is only available for Teams at the moment.

      We may support exploring this package in the future. Check back soon.

      Install

      npm i @vangware/test

      DownloadsWeekly Downloads

      39

      Version

      8.0.4

      License

      MIT

      Unpacked Size

      40.1 kB

      Total Files

      97

      Last publish

      Collaborators

      • lukeshiru