1.3.1 • Published 7 years ago

mock20 v1.3.1

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

Mock20

Build Status Coverage Status dependencies Status

A node.js module that mocks the Roll20 API environment.

For an exmple Roll20 project that uses Mock20, see Example Mock20 Testing.

Installation

1) Get node and npm.

2) Turn your scripts into a node module.

3) Add mock20 as a dependency.

`npm install mock20`

4) Require mock20 and signal the end of your scripts.

```
require('mock20');
 
//your script here

MOCK20endOfLastScript(); //triggers all of your on('ready') functions
```

Mocking

Mock20 mocks all of the functions listed in the Roll20 API wiki.

See the wiki for more information.

Simulating

Mock20 can simulate circumstances you may want to test.

See the wiki for more information.

var player = createObj('player', {_displayname: 'test player'}, {MOCK20override: true});
var gm = createObj('player', {_displayname: 'test gm'}, {MOCK20override: true});
gm.MOCK20gm = true;

player.MOCK20chat('!gmOnlyCMD');
gm.MOCK20chat('!gmOnlyCMD');

Issues

If you have any issues with Mock20 please report them through github's issues.

Contributing

If you would like to contribute to the project, open up a fork and work away.

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago