bs-tape

0.3.0 • Public • Published

bs-tape

CircleCI Coverage Status

BuckleScript bindings for tape.

There were already bindings for jest, but I find Jest to be pretty annoying to use, and a bit "too magical". So, I made this one.

Please be warned that I'm new to ReasonML / BuckleScript / OCaml, so there may be things herein that are non-idiomatic. PRs encouraged and welcomed!

Getting Started

First, install the package:

yarn add --dev bs-tape

Then, add bs-tape to your bs-dev-dependencies in your bsconfig.json:

{
  // ...
  "bs-dev-dependencies": [
    // ...
    "bs-tape"
  ],
  // ...
}

Known Limitations and Differences from tape

  • equal has been decomposed into typesafe: equalStr, equalInt, and equalFloat
  • endTest replaces end (which is a reserved keyword)
  • end has been decomposed into typesafe: endTest and endTestIfNoErr
  • Given that "arbitrarily shaped" data structures are non-idiomatic in ReasonML (and OCaml), the following tape assertions are not supported, but can be effectively simulated by creating the appropriate expression with the == and ! operators, then invoking the ok assertion.
    • deepEqual
    • notDeepEqual
    • deepLooseEqual
    • notDeepLooseEqual

License

ISC. See the LICENSE file.

Package Sidebar

Install

npm i bs-tape

Weekly Downloads

2

Version

0.3.0

License

ISC

Unpacked Size

13.3 kB

Total Files

13

Last publish

Collaborators

  • jeffreywescott