stratumn-mock-agent
v1.2.0
Published
Allows testing a Stratumn agent
Downloads
4
Readme
stratumn-mock-agent
Allows testing a Stratumn agent
Installation
npm install --save stratumn-mock-agent
Usage
import mockAgent from '../src/mockAgent';
const agent = require('agent');
describe('My agent', () => {
const data = { message: 'test' };
it('returns the state in the result on function call', done => {
mockAgent(agent).init(data).then(res => {
res.state.should.eql(data);
done();
}).catch(done);
});
});
Check tests for more examples.
Credits
Stratumn Team
License
Apache License 2.0