1.2.0 • Published 7 years ago

stratumn-mock-agent v1.2.0

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
7 years ago

stratumn-mock-agent

Allows testing a Stratumn agent

build status dependency status

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

1.2.0

7 years ago

1.1.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago