clement
Write tests that are friendly to newer programmers
Last updated 2 years ago by maryrosecook .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install clement 
SYNC missed versions from official npm registry.

Clement

Write tests that are friendly to newer programmers.

Goals

  • Easy(ish) to read. Terse test code.
  • Inlined into main application code, not put in separate files.
  • Errors include only the most useful information.
  • Terse. Test can be written on one line. Test description and test code are the same thing.

Usage

const test = require("clement");

test(_ => _("Expect", returnTrue(), "to equal", true));
// Prints:
// ✅ "Expect", returnTrue(), "to equal", true

test(_ => _("Expect", throws(), "to equal", true));
// Prints:
// ❌ "Expect", throws(), "to equal", true
//    but get error `Boom`
//    on line 17

function returnTrue() {
  return true;
};

function throws() {
  throw new Error("Boom");
};

Install

$ npm install clement

Current Tags

  • 2.0.0                                ...           latest (2 years ago)

1 Versions

  • 2.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |