Skip to content
This repository has been archived by the owner. It is now read-only.
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
Aug 26, 2018
Aug 26, 2018
Aug 26, 2018
Aug 26, 2018
Aug 26, 2018

README.md

bs-ava

Build Status

Experimental BuckleScript bindings for Ava

Installation

npm install --save-dev ava@next @ava/bucklescript

Then add @ava/bucklescript to bs-dev-dependencies in your bsconfig.json:

{
  ...
  "bs-dev-dependencies": ["@ava/bucklescript"]
}

Getting started

open Sync;

test("Should pass", t => {
  t.deepEqual(1, 1);
  t.pass();
});
open Async;

test("Should pass", t => {
  Js.Global.setTimeout(() => t.end_(), 1000)
  |> ignore
});
open Promise;

test("Should pass", t => {
  t.notThrows(Js.Promise.resolve("foo"));
});

Coverage

  • Install nyc
npm i -D nyc
  • Edit your package.json
{
  "scripts": {
    ...
    "test": "nyc ava"
  },
  ...
  "nyc": {
    "reporter": [
      "lcov",
      "text-summary"
    ]
  }
}
You can’t perform that action at this time.