Closed slowdownitsfine closed 6 years ago
Sorry for the delayed response, I've been mainly responding to bug / issues on the main mockserver repository: https://github.com/jamesdbloom/mockserver
I think the issue is with the format of the callback, please using the following format:
const mockClient = require('mockserver-client');
const client = mockClient.mockServerClient('localhost', 3300);
client
.verify({
httpRequest: {
method: 'POST',
path: '/testpath',
body: {}
}
})
.then(function() {
}, function(error) {
console.log(error);
});
I am currently rewriting the main documentation / website. I will be adding 100s of more code examples, including examples of how to do verifications using the node client.
Use this packet a ton, thank you!
Don't know if this is a bug or I'm doing something wrong ,but I am uncertain with
.verify
.When running the mock server like so from the command line:
And then running the following lines in node
v4.6.2
:I will never see the
console.log
in the promise callback. If I'm not mistaken the verification should fail, since no previous request was made, right?