Skip to content

Instantly share code, notes, and snippets.

@gerad
Created May 4, 2015 21:04
Show Gist options
  • Save gerad/a862b58a75e30c068ddf to your computer and use it in GitHub Desktop.
Save gerad/a862b58a75e30c068ddf to your computer and use it in GitHub Desktop.
var assert = require('assert');
var contracts = require('contracts'); // our home-built contract testing library
var echo = require('./echo_consumer');
// test the echo consumer
var stubConnection = contracts.connection();
echo(stubConnection, 'echo', function(response) {
assert.equal(response, 'echo');
});
stubConnection.testContract("echo-contract.json", { as: "consumer" });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment