Skip to content

Commit

Permalink
Merge pull request #4 from ajb413/cleanup
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
ajb413 committed Nov 10, 2017
2 parents f7bc9e0 + 3e4c24a commit 4080943
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store
node_modules/
.nyc_output/
.coveralls.yml
package-lock.json
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# PubNub Functions Mock

[![Coverage Status](https://coveralls.io/repos/github/ajb413/pubnub-functions-mock/badge.svg?branch=master)](https://coveralls.io/github/ajb413/pubnub-functions-mock?branch=master)

Unit test PubNub Functions event handlers on your local machine

##Currently supported modules for mock
([docs here](https://www.pubnub.com/docs/blocks/xhr-module)):
## Currently supported modules for mock ([docs here](https://www.pubnub.com/docs/blocks/xhr-module)):
- XHR (currently makes **real** requests using https://www.npmjs.com/package/node-fetch)
- KV Store
- codec/query_string
Expand Down
17 changes: 13 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
{
"name": "pubnub-functions-mock",
"version": "0.0.6",
"version": "0.0.7",
"description": "Mocks PubNub Functions modules for unit testing",
"main": "src/index.js",
"repository": {
"type": "git",
"url": "https://github.com/ajb413/pubnub-functions-mock"
},
"scripts": {
"test": "nyc mocha test/unit.test.js"
"test": "mocha test/unit.test.js"
},
"devDependencies": {
"coveralls": "^3.0.0",
"mocha": "^4.0.1",
"mocha-lcov-reporter": "^1.3.0",
"nyc": "^11.3.0"
},
"dependencies": {
"babel-core": "^6.22.1",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-preset-es2015": "^6.22.0",
"chai": "^4.1.2",
"node-fetch": "^1.6.3",
"nyc": "^11.3.0",
"proxyquire": "^1.7.11",
"qs": "^6.3.0",
"tmp": "0.0.31"
},
"author": "open-source@pubnub.com"
"author": "ajb413"
}
1 change: 0 additions & 1 deletion test/endpointEventHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export default (request, response) => {
if (request.defaultMock) {
let pubnub = require('pubnub');
if (pubnub.publish) {
console.log(pubnub.publish);
response.status = 200;
return response.send(true);
}
Expand Down

0 comments on commit 4080943

Please sign in to comment.