minihull
## Versions Compatibility
Last updated a year ago by michaloo .
Original npm · Tarball · package.json
$ cnpm install minihull 
SYNC missed versions from official npm registry.

MiniHull

Versions Compatibility

Minihull v3.0.0 relies on hull-node v0.14.0 and hull-client v2.0.0 and up. Use Minihull v2.1.2 if you're using previous versions of the libraries.

Scriptable usage

For automatic tests use the following methods:

  • stubConnector() - for stubbing response for connector
  • stubUserSegments() - for stubbing response for user segments
  • stubAccountSegments() - for stubbing response for account segments
  • stubUsersBatch() - for stubbing users batching to connector
  • stubAccountsBatch() - for stubbing accounts batching to connector
const MiniHull = require("minihull");
const miniHull = new Minihull();
const connectorId = minihull.fakeId();

miniHull.listen(3000);

const connector = {
  id: connectorId,
  private_settings: {
    enrich_segments: ["1"]
  }
};

miniHull.stubConnector(connector);

miniHull.stubUserSegments([{
  id: "1",
  name: "A"
}]);

miniHull.stubAccountSegments([{
  id: "1",
  name: "A"
}]);

miniHull.postConnector(connector, "http://localhost:8000/test").then(() => {
  assert(miniHull.requests.get("incoming").length, 1);
  miniHull.close();
});

interactive usage

$ bin/mini-hull
miniHull listening on 3000
miniHull > fakeUsers(5)
miniHull > fakeSegments(2)
miniHull > fakeAssignment()
miniHull > mimicInstall("http://connector-host:8000")
miniHull > mimicPostConnector("/custom-operation")
miniHull > requests.get("incoming").value()

Current Tags

  • 3.0.2                                ...           latest (a year ago)

18 Versions

  • 3.0.2                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 2.1.2                                ...           a year ago
  • 2.1.1                                ...           a year ago
  • 2.1.0                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
  • 0.0.7                                ...           2 years ago
  • 0.0.6                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 0
Last Month 26
Dependencies (7)
Dev Dependencies (1)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |