Skip to content

Commit

Permalink
Readme fix (#13)
Browse files Browse the repository at this point in the history
* better syntax

* version bump
  • Loading branch information
ajb413 committed Nov 14, 2017
1 parent 4b3cf75 commit d4957a8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Any module can be overridden using `overrideDefaultModules` within a single test
```javascript
endpoint.overrideDefaultModules({
"xhr" : () => {
return new Promise.resolve(200);
return Promise.resolve(200);
}
});
```
Expand All @@ -26,7 +26,7 @@ To override a default module in all tests, pass the module object when the Event
```javascript
endpoint = Mock('./myEndpointEventHandler.js', {
"xhr" : () => {
return new Promise.resolve(200);
return Promise.resolve(200);
}
});
```
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pubnub-functions-mock",
"version": "0.0.12",
"version": "0.0.13",
"description": "Mocks PubNub Functions modules for unit testing",
"main": "src/index.js",
"repository": {
Expand Down
6 changes: 3 additions & 3 deletions test/unit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const endpointResponseObject = {
"headers": {},
"status": 200,
"send": function ( body ) {
return new Promise( (resolve) => {
return new Promise((resolve) => {
if (body === undefined) {
body = "";
}
Expand Down Expand Up @@ -482,7 +482,7 @@ describe('#endpoint', () => {

let overrides = {
"pubnub": function () {
return new Promise.resolve(true);
return Promise.resolve(true);
}
};

Expand Down Expand Up @@ -525,7 +525,7 @@ describe('#endpoint', () => {

let overrides = {
"pubnub": function () {
return new Promise.resolve(true);
return Promise.resolve(true);
}
};

Expand Down

0 comments on commit d4957a8

Please sign in to comment.