{"_id":"apimok","_rev":"43-b2eb416b5cb1d076a3df16735d1bec68","name":"apimok","description":"Mock web API requests for use in front-end testing","dist-tags":{"latest":"0.2.2"},"versions":{"0.0.1":{"name":"apimok","description":"Mock web API requests for use in front-end testing","version":"0.0.1","dependencies":{"express":"3.x"},"readme":"apimok\n======\n\nMock web API requests for use in front-end testing","readmeFilename":"README.md","_id":"apimok@0.0.1","dist":{"shasum":"1671157de276280f820fc5d845b2e27866a80cfc","tarball":"https://registry.npmjs.org/apimok/-/apimok-0.0.1.tgz","integrity":"sha512-tr8Hn4HIUW+4vLAEFHXIW7MF/gY5NetBR9VYCcyVF5jDxkFg/JUIpPLrFpkN4r2MPH3IcN/zWNlwXgOtKIMo+A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHzv6B3KiskJTMNgSP/3YYMhAosCSjl6GqxD/Pxd+Rt2AiAwdoJsvX7hRF0H0/UGc7q50PIN8oMKLC717wfS0o0wkQ=="}]},"_npmVersion":"1.1.70","_npmUser":{"name":"rco8786","email":"rco8786@gmail.com"},"maintainers":[{"name":"rco8786","email":"rco8786@gmail.com"}],"directories":{}},"0.0.2":{"name":"apimok","description":"Mock web API requests for use in front-end testing","version":"0.0.2","dependencies":{"express":"3.x"},"readme":"apimok\n======\n\n--Not quite production ready folks\n\nMock web API requests with Nodejs for use in front-end testing.  \nAllows you to write tests that run all the way up to the API endpoint for deep integration testing.\n\nRequirements\n============\n\nNodejs and NPM.\n\nInstallation\n============\n\napimok is available as a package via NPM.  This is the recommended way to install and update apimok.\n\n    npm install apimok\n    \nUsage\n=====\n\nTo pull the apimok client library into your test suite runner:\n\n    <script src=\"http://localhost:3001/apimok-lib\"></script>\n\nThis will automatically pull the client library version corresponding to the overall version of apimok. Note that the apimok server runs on port 3001 by default.  This will be configurable in a later release.\n\n*Create a new mok*\n\n    mok({\n        url: 'api/test',\n        verb: 'GET',\n        returnValue: {\n            id: 1,\n            name: 'Test'\n        }\n    });\n\nNow anytime your code hits the endpoint at 'api/test' using a 'GET' request, the object assigned to returnValue will be returned as Json.\n\n*Remove moks*\n\n    destroyMoks();\n    \nThis will remove all moks that are currently stored in the server.  Generally part of a TearDown sequence.\n\nCheck out the /samples directory for some working examples.\n\nRunning Tests\n=============\n\nCurrently, cross-domain requests are not supported.  This poses 2 limitations: 1) API requests must be relative to your application in order to be mocked.  (a call to \"http://api.yourmain.com/user\" cannot be mocked).  2) The apimok server must serve your test .js files.\n\nA solution to #1 will be available in a later relase, as there is more involved than simply enabling cross-domain requests.  For #2, the apimok node module also serves as a static file server.  All you have to do is tell it where your applicatoin is when you start the server:\n\n    cd /Path/to/apimok\n    node index.js /Path/to/application\n    \n(Better command line support coming soon)\n\nWith the server running, simply open your test .html in the browser by going to http://localhost:3001/path/to/testrunner to run your tests.\n\nCurrent Limitations\n===================\n\n- Does not support cross-domain api requests so your test suite must run with the node server. \n- No command line support\n- No integration with build servers(CruiseControl, Jenkins, etc)\n- Only supports Json requests\n","readmeFilename":"README.md","_id":"apimok@0.0.2","dist":{"shasum":"c918eb33b2850b211f401fa75cfe4bb749aec4a7","tarball":"https://registry.npmjs.org/apimok/-/apimok-0.0.2.tgz","integrity":"sha512-iYtu1pFwIQpuYuTjqSS9IKN4Z08sjNNS41DeHKeyMEX0vY8TC+8CQPgbloWV5yT8xfi2xyFpyHpjIY7X2S3AMw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBkkNaguQ/GBfP5jH4nL1sgjcBTiCZBNr2lrjBeuU/qQAiEA3NtpdI8nFRdLlrDWAdLSIJlqxukLA7e8uwNkCLfjtFM="}]},"_npmVersion":"1.1.70","_npmUser":{"name":"rco8786","email":"rco8786@gmail.com"},"maintainers":[{"name":"rco8786","email":"rco8786@gmail.com"}],"directories":{}},"0.0.3":{"name":"apimok","description":"Mock web API requests for use in front-end testing","version":"0.0.3","dependencies":{"express":"3.x","optimist":"0.3.x"},"bin":{"apimok":"./index.js"},"readme":"apimok\n======\n\n--Not quite production ready folks\n\nMock web API requests with Nodejs for use in front-end testing.  \nAllows you to write tests that run all the way up to the API endpoint for deep integration testing.\n\nRequirements\n============\n\nNodejs and NPM.\n\nInstallation\n============\n\napimok is available as a package via NPM.  This is the recommended way to install and update apimok.\n\n    npm install apimok\n    \nUsage\n=====\n\nTo pull the apimok client library into your test suite runner:\n\n    <script src=\"http://localhost:3001/apimok-lib\"></script>\n\nThis will automatically pull the client library version corresponding to the overall version of apimok. Note that the apimok server runs on port 3001 by default(configurable from command line using the -p flag).\n\n*Create a new mok*\n\n    var mokServer = new ApiMok(port[optional]);\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'GET',\n        returnValue: {\n            id: 1,\n            name: 'Test'\n        }\n    });\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'POST',\n        returnValue: {\n            success: true\n        }\n    });\n\nNow anytime your code hits the endpoint at 'api/test' using a 'GET' request, the object assigned to returnValue will be returned as Json.  Same with the POST below it.\n\n*Remove moks*\n\n    mokServer.destroyMoks();\n    \nThis will remove all moks that are currently stored in the server.  Generally part of a TearDown sequence.\n\nCheck out the /samples directory for some working examples.\n\nRunning Tests\n=============\n\nCurrently, cross-domain requests are not supported.  This poses 2 limitations: 1) API requests must be relative to your application in order to be mocked.  (a call to \"http://api.yourmain.com/user\" cannot be mocked).  2) Your test specs must be included somewhere under your app's root direction(this is typical anyway).\n\nA solution to #1 will be available in a later relase, as there is more involved than simply enabling cross-domain requests.  For #2, the apimok node module also serves as a static file server.  All you have to do is tell it where your application is when you start the server:\n\n    cd /Path/to/apimok\n    node index.js --app /Path/to/application --target /specrunner.html\n    \n(Better command line support coming soon).  To see all options run _node index.js_.\n\nApimok will now spin up its server and run all the tests at http://localhost:3001/specrunner.html using PhantomJs.  Output will appear in the console.\n\nIf you prefer to run the server and browse to the output page in your browser, use the _-m_ flag.  With the server running, open your test output page in the browser by going to http://localhost:3001/path/to/testrunner to run your tests.\n\nCurrent Limitations\n===================\n\n- Does not support cross-domain api requests so your test suite must run with the node server. \n- No integration with build servers(CruiseControl, Jenkins, etc)\n- Only supports Json responses.\n","readmeFilename":"README.md","_id":"apimok@0.0.3","dist":{"shasum":"c0de9cdb3d1e7f1ed9969863877d0af3645148e2","tarball":"https://registry.npmjs.org/apimok/-/apimok-0.0.3.tgz","integrity":"sha512-3qN/wjwnD1UCCIGMFPmc09bC3iYCbfS0aeetK6bfCnNuMPfneEX32881QwKsBeHxF4UsdcgTzxEzQv6Gru7V9w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuAiBumYjqynDqmM5jngSF7oUAYARDcQMFC6u2YhiSUQIhAOe1/GG/pP2kRcZo2MC6AssoNcL33O32FFGx2r5YuA/I"}]},"_npmVersion":"1.1.70","_npmUser":{"name":"rco8786","email":"rco8786@gmail.com"},"maintainers":[{"name":"rco8786","email":"rco8786@gmail.com"}],"directories":{}},"0.0.5":{"name":"apimok","description":"Mock web API requests for use in front-end testing","version":"0.0.5","dependencies":{"express":"3.x","optimist":"0.3.x"},"bin":{"apimok":"./bin/apimok"},"readme":"apimok\n======\n\n--Not quite production ready folks\n\nMock web API requests with Nodejs for use in front-end testing.  \nAllows you to write tests that run all the way up to the API endpoint for deep integration testing.\n\nRequirements\n============\n\nNodejs and NPM.\n\nInstallation\n============\n\napimok is available as a package via NPM.  This is the recommended way to install and update apimok.\n\n    npm install apimok\n    \nUsage\n=====\n\nTo pull the apimok client library into your test suite runner:\n\n    <script src=\"http://localhost:3001/apimok-lib\"></script>\n\nThis will automatically pull the client library version corresponding to the overall version of apimok. Note that the apimok server runs on port 3001 by default(configurable from command line using the -p flag).\n\n*Create a new mok*\n\n    var mokServer = new ApiMok(port[optional]);\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'GET',\n        returnValue: {\n            id: 1,\n            name: 'Test'\n        }\n    });\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'POST',\n        returnValue: {\n            success: true\n        }\n    });\n\nNow anytime your code hits the endpoint at 'api/test' using a 'GET' request, the object assigned to returnValue will be returned as Json.  Same with the POST below it.\n\n*Remove moks*\n\n    mokServer.destroyMoks();\n    \nThis will remove all moks that are currently stored in the server.  Generally part of a TearDown sequence.\n\nCheck out the /samples directory for some working examples.\n\nRunning Tests\n=============\n\nCurrently, cross-domain requests are not supported.  This poses 2 limitations: 1) API requests must be relative to your application in order to be mocked.  (a call to \"http://api.yourmain.com/user\" cannot be mocked).  2) Your test specs must be included somewhere under your app's root direction(this is typical anyway).\n\nA solution to #1 will be available in a later relase, as there is more involved than simply enabling cross-domain requests.  For #2, the apimok node module also serves as a static file server.  All you have to do is tell it where your application is when you start the server:\n\n    cd /Path/to/apimok\n    node index.js --app /Path/to/application --target /specrunner.html\n    \n(Better command line support coming soon).  To see all options run _node index.js_.\n\nApimok will now spin up its server and run all the tests at http://localhost:3001/specrunner.html using PhantomJs.  Output will appear in the console.\n\nIf you prefer to run the server and browse to the output page in your browser, use the _-m_ flag.  With the server running, open your test output page in the browser by going to http://localhost:3001/path/to/testrunner to run your tests.\n\nCurrent Limitations\n===================\n\n- Does not support cross-domain api requests so your test suite must run with the node server. \n- No integration with build servers(CruiseControl, Jenkins, etc)\n- Only supports Json responses.\n","readmeFilename":"README.md","_id":"apimok@0.0.5","dist":{"shasum":"88c911116bdf02fe1c4ab8a54eebbf8eade33ece","tarball":"https://registry.npmjs.org/apimok/-/apimok-0.0.5.tgz","integrity":"sha512-czo3xLTUAAQCEUkb6srToQc1LpGVvER8LU6hnXjki24VDXd13+RqkPhEMXVVH9c4uxkgWm+tpdHc9bcqtlQ5cA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEFLkgaXFbZULTyU88Hm0b5lVt31Dvw3B7dJeECTD1l0AiEAhuayMKO1LbKQd1jtislIftWdUd9sp2boIliNgLYEK48="}]},"_npmVersion":"1.1.70","_npmUser":{"name":"rco8786","email":"rco8786@gmail.com"},"maintainers":[{"name":"rco8786","email":"rco8786@gmail.com"}],"directories":{}},"0.0.6":{"name":"apimok","description":"Mock web API requests for use in front-end testing","version":"0.0.6","dependencies":{"express":"3.x","optimist":"0.3.x"},"bin":{"apimok":"./bin/apimok"},"readme":"Apimok\n======\n\nMock web API requests with Nodejs for use in front-end testing.  \nAllows you to write tests that run all the way up to the API endpoint for deep integration testing.\n\nSupports any browser-based Javascript testing framework.  Currently has command line(via PhantomJS) support for Jasmine.\n\nRequirements\n============\n\nNodejs, PhantomJS, and NPM.\n\nInstallation\n============\n\napimok is available as a package via NPM.  This is the recommended way to install and update Apimok.\n\n    npm install apimok\n    \nUsage\n=====\n\nTo pull the apimok client library into your test runner:\n\n    <script src=\"http://localhost:3001/apimok-lib\"></script>\n\nThis will automatically pull the current client library into your page. Note that the apimok server runs on port 3001 by default(configurable from command line using the -p flag).\n\nIf you are running Jasmine, use the following as a template for your SpecRunner.html.  It pulls in both the client library and the JUnitXmlReport(required).\n\n    <!DOCTYPE HTML>\n    <html>\n    <head>\n      <title>Jasmine Spec Runner</title>\n\n      <link rel=\"stylesheet\" type=\"text/css\" href=\"lib/jasmine-1.3.1/jasmine.css\">\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine.js\"></script>\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine-html.js\"></script>  \n      <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\n\n      <!-- ApiMok library REQUIRED-->\n      <script type=\"text/javascript\" src=\"http://localhost:3001/apimok-lib\"></script>\n      \n      <!-- JUnitXmlReporter REQUIRED -->\n      <script type=\"text/javascript\" src=\"http://localhost:3001/junit-xml-reporter\"></script>\n\n      <!-- include source files here... -->\n      <script type=\"text/javascript\" src=\"src/Player.js\"></script>\n\n      <!-- include spec files here... -->\n      <script type=\"text/javascript\" src=\"spec/PlayerSpec.js\"></script>\n\n      <script type=\"text/javascript\">\n      (function() {    \n\n        var currentWindowOnload = window.onload;\n\n        window.onload = function() {\n          if (currentWindowOnload) {\n            currentWindowOnload();\n          }\n          execJasmine();\n        };\n\n        function execJasmine() {\n          jasmine.getEnv().addReporter(new jasmine.TrivialReporter());  //REQUIRED\n          jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter()); //REQUIRED\n          jasmine.getEnv().execute();\n        }\n\n       })();\n       </script>\n\n    </head>\n    <body>\n    </body>\n    </html>\n\n\n*Create a new mok*\n\n    var mokServer = new ApiMok(port[optional]);\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'GET',\n        returnValue: {\n            id: 1,\n            name: 'Test'\n        }\n    });\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'POST',\n        returnValue: {\n            success: true\n        }\n    });\n\nNow anytime your code hits the endpoint at 'api/test' using a 'GET' request, the object assigned to returnValue will be returned as Json.  Same with the POST below it.\n\n*Remove moks*\n\n    mokServer.destroyMoks();\n    \nThis will remove all moks that are currently stored in the server.  Generally part of a TearDown sequence.\n\nCheck out the /samples directory for some working examples.\n\nRunning Tests\n=============\n\nCurrently, cross-domain requests are not supported.  This poses 2 limitations: 1) API requests must be relative to your application in order to be mocked.  (a call to \"http://api.yourmain.com/user\" cannot be mocked).  2) Your test specs must be included somewhere under your app's root direction(this is typical anyway).\n\nA solution to #1 will be available in a later relase, as there is more involved than simply enabling cross-domain requests.  For #2, the apimok node module also serves as a static file server.  All you have to do is tell it where your application is when you start the server:\n\n    cd /path/to/application\n    apimok --with jasmine --target app-test/specrunner.html\n    \nTo see all options run _apimok_.\n\nApimok will now spin up its server and run all the tests at http://localhost:3001/app-test/specrunner.html using PhantomJs.  Output will appear in the console.\n\nIf you prefer to run the server and browse to the output page in your browser, use the _-m_ flag.  With the server running, open your test output page in the browser by going to http://localhost:3001/path/to/testrunner to run your tests.\n\nCurrent Limitations\n===================\n\n- Does not support cross-domain api requests so your test suite must run with the node server. \n- Only supports Json responses.\n\nComing In Later Releases\n========================\n\n- Support for more testing frameworks in the command line\n- Integration with common CI servers(CruiseControl, Jenkins)\n","readmeFilename":"README.md","_id":"apimok@0.0.6","dist":{"shasum":"68ff2709668e24cce74dcb5586ffbbdf5ce146ae","tarball":"https://registry.npmjs.org/apimok/-/apimok-0.0.6.tgz","integrity":"sha512-QAxD8XxiDQwIGtl0A/xm7QgZOBUDnU/bMP0Pokak0CIfws28U5fTg3efgjddDfIRsOwZ6rcrXd0EjEGxVTJ7ng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1Atv7c+G7ArVmrIzymaEqJrA72S+k2ede9qyuf29TNgIgBaqeUMzMb2H9/534o8PABBsBNDgI/G4qPVizHwc/ewg="}]},"_npmVersion":"1.1.70","_npmUser":{"name":"rco8786","email":"rco8786@gmail.com"},"maintainers":[{"name":"rco8786","email":"rco8786@gmail.com"}],"directories":{}},"0.0.7":{"name":"apimok","description":"Mock web API requests for use in front-end testing","version":"0.0.7","dependencies":{"express":"3.x","optimist":"0.3.x"},"bin":{"apimok":"./bin/apimok"},"readme":"Apimok\n======\n\nMock web API requests with Nodejs for use in front-end testing.  \nAllows you to write tests that run all the way up to the API endpoint for deep integration testing.\n\nSupports any browser-based Javascript testing framework.  Currently has command line(via PhantomJS) support for Jasmine.\n\nRequirements\n============\n\nNodejs, PhantomJS, and NPM.\n\nInstallation\n============\n\napimok is available as a package via NPM.  This is the recommended way to install and update Apimok.\n\n    npm install apimok\n    \nUsage\n=====\n\nTo pull the apimok client library into your test runner:\n\n    <script src=\"http://localhost:3001/apimok-lib\"></script>\n\nThis will automatically pull the current client library into your page. Note that the apimok server runs on port 3001 by default(configurable from command line using the -p flag).\n\nIf you are running Jasmine, use the following as a template for your SpecRunner.html.  It pulls in both the client library and the JUnitXmlReport(required).\n\n    <!DOCTYPE HTML>\n    <html>\n    <head>\n      <title>Jasmine Spec Runner</title>\n\n      <link rel=\"stylesheet\" type=\"text/css\" href=\"lib/jasmine-1.3.1/jasmine.css\">\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine.js\"></script>\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine-html.js\"></script>  \n      <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\n\n      <!-- ApiMok library REQUIRED-->\n      <script type=\"text/javascript\" src=\"http://localhost:3001/apimok-lib\"></script>\n      \n      <!-- JUnitXmlReporter REQUIRED -->\n      <script type=\"text/javascript\" src=\"http://localhost:3001/junit-xml-reporter\"></script>\n\n      <!-- include source files here... -->\n      <script type=\"text/javascript\" src=\"src/Player.js\"></script>\n\n      <!-- include spec files here... -->\n      <script type=\"text/javascript\" src=\"spec/PlayerSpec.js\"></script>\n\n      <script type=\"text/javascript\">\n      (function() {    \n\n        var currentWindowOnload = window.onload;\n\n        window.onload = function() {\n          if (currentWindowOnload) {\n            currentWindowOnload();\n          }\n          execJasmine();\n        };\n\n        function execJasmine() {\n          jasmine.getEnv().addReporter(new jasmine.TrivialReporter());  //REQUIRED\n          jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter()); //REQUIRED\n          jasmine.getEnv().execute();\n        }\n\n       })();\n       </script>\n\n    </head>\n    <body>\n    </body>\n    </html>\n\n\n*Create a new mok*\n\n    var mokServer = new ApiMok(port[optional]);\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'GET',\n        returnValue: {\n            id: 1,\n            name: 'Test'\n        }\n    });\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'POST',\n        returnValue: {\n            success: true\n        }\n    });\n\nNow anytime your code hits the endpoint at 'api/test' using a 'GET' request, the object assigned to returnValue will be returned as Json.  Same with the POST below it.\n\n*Remove moks*\n\n    mokServer.destroyMoks();\n    \nThis will remove all moks that are currently stored in the server.  Generally part of a TearDown sequence.\n\nCheck out the /samples directory for some working examples.\n\nRunning Tests\n=============\n\nCurrently, cross-domain requests are not supported.  This poses 2 limitations: 1) API requests must be relative to your application in order to be mocked.  (a call to \"http://api.yourmain.com/user\" cannot be mocked).  2) Your test specs must be included somewhere under your app's root direction(this is typical anyway).\n\nA solution to #1 will be available in a later relase, as there is more involved than simply enabling cross-domain requests.  For #2, the apimok node module also serves as a static file server.  All you have to do is tell it where your application is when you start the server:\n\n    cd /path/to/application\n    apimok --with jasmine --target app-test/specrunner.html\n    \nTo see all options run _apimok_.\n\nApimok will now spin up its server and run all the tests at http://localhost:3001/app-test/specrunner.html using PhantomJs.  Output will appear in the console.\n\nIf you prefer to run the server and browse to the output page(or you are using a framework that is NOT Jasmine) in your browser, use the _-m_ flag.  With the server running, open your test output page in the browser by going to http://localhost:3001/path/to/testrunner to run your tests.\n\nCurrent Limitations\n===================\n\n- Does not support cross-domain api requests so your test suite must run with the node server. \n- Only supports Json responses.\n\nComing In Later Releases\n========================\n\n- Support for more testing frameworks in the command line\n- Integration with common CI servers(CruiseControl, Jenkins)\n","readmeFilename":"README.md","_id":"apimok@0.0.7","dist":{"shasum":"a6ee37ca11f27ea8922a9b00e59f36c66a81fce6","tarball":"https://registry.npmjs.org/apimok/-/apimok-0.0.7.tgz","integrity":"sha512-PpNlNe4L12GDbYiEtbOJ6NV6319jeVvYfc0wvkoJF3ErefDpLmHHWkLpI/On9NvyIx0xTVDh/VMGlPJJMdUWZg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiIFqoO1KELVS+tCdh78I89D6QewtAwg6eVccr+0eQsQIgNY04y4SLRbQQAqCTeheMlhDNmNe7YOiXvApQT6IIFFs="}]},"_npmVersion":"1.1.70","_npmUser":{"name":"rco8786","email":"rco8786@gmail.com"},"maintainers":[{"name":"rco8786","email":"rco8786@gmail.com"}],"directories":{}},"0.0.8":{"name":"apimok","description":"Mock web API requests for use in front-end testing","version":"0.0.8","dependencies":{"express":"3.x","optimist":"0.3.x"},"bin":{"apimok":"./bin/apimok"},"readme":"Apimok\n======\n\nMock web API requests with Nodejs for use in front-end testing.  \nAllows you to write tests that run all the way up to the API endpoint for deep integration testing.\n\nSupports any browser-based Javascript testing framework.  Currently has command line(via PhantomJS) support for Jasmine.\n\nRequirements\n============\n\nNodejs, PhantomJS, and NPM.\n\nInstallation\n============\n\napimok is available as a package via NPM.  This is the recommended way to install and update Apimok.\n\n    npm install apimok\n    \nUsage\n=====\n\nTo pull the apimok client library into your test runner:\n\n    <script src=\"http://localhost:3001/apimok-lib\"></script>\n\nThis will automatically pull the current client library into your page. Note that the apimok server runs on port 3001 by default(configurable from command line using the -p flag).\n\nIf you are running Jasmine, use the following as a template for your SpecRunner.html.  It pulls in both the client library and the JUnitXmlReport(required).\n\n    <!DOCTYPE HTML>\n    <html>\n    <head>\n      <title>Jasmine Spec Runner</title>\n\n      <link rel=\"stylesheet\" type=\"text/css\" href=\"lib/jasmine-1.3.1/jasmine.css\">\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine.js\"></script>\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine-html.js\"></script>  \n      <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\n\n      <!-- ApiMok library REQUIRED-->\n      <script type=\"text/javascript\" src=\"http://localhost:3001/apimok-lib\"></script>\n      \n      <!-- JUnitXmlReporter REQUIRED -->\n      <script type=\"text/javascript\" src=\"http://localhost:3001/junit-xml-reporter\"></script>\n\n      <!-- include source files here... -->\n      <script type=\"text/javascript\" src=\"src/Player.js\"></script>\n\n      <!-- include spec files here... -->\n      <script type=\"text/javascript\" src=\"spec/PlayerSpec.js\"></script>\n\n      <script type=\"text/javascript\">\n      (function() {    \n\n        var currentWindowOnload = window.onload;\n\n        window.onload = function() {\n          if (currentWindowOnload) {\n            currentWindowOnload();\n          }\n          execJasmine();\n        };\n\n        function execJasmine() {\n          jasmine.getEnv().addReporter(new jasmine.TrivialReporter());  //REQUIRED\n          jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter()); //REQUIRED\n          jasmine.getEnv().execute();\n        }\n\n       })();\n       </script>\n\n    </head>\n    <body>\n    </body>\n    </html>\n\n\n*Create a new mok*\n\n    var mokServer = new ApiMok(port[optional]);\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'GET',\n        returnValue: {\n            id: 1,\n            name: 'Test'\n        }\n    });\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'POST',\n        returnValue: {\n            success: true\n        }\n    });\n\nNow anytime your code hits the endpoint at 'api/test' using a 'GET' request, the object assigned to returnValue will be returned as Json.  Same with the POST below it.\n\n*Remove moks*\n\n    mokServer.destroyMoks();\n    \nThis will remove all moks that are currently stored in the server.  Generally part of a TearDown sequence.\n\nCheck out the /samples directory for some working examples.\n\nRunning Tests\n=============\n\nCurrently, cross-domain requests are not supported.  This poses 2 limitations: 1) API requests must be relative to your application in order to be mocked.  (a call to \"http://api.yourmain.com/user\" cannot be mocked).  2) Your test specs must be included somewhere under your app's root direction(this is typical anyway).\n\nA solution to #1 will be available in a later relase, as there is more involved than simply enabling cross-domain requests.  For #2, the apimok node module also serves as a static file server.  All you have to do is tell it where your application is when you start the server:\n\n    cd /path/to/application\n    apimok --with jasmine --target app-test/specrunner.html\n    \nTo see all options run _apimok_.\n\nApimok will now spin up its server and run all the tests at http://localhost:3001/app-test/specrunner.html using PhantomJs.  Output will appear in the console.\n\nIf you prefer to run the server and browse to the output page(or you are using a framework that is NOT Jasmine) in your browser, use the _-m_ flag.  With the server running, open your test output page in the browser by going to http://localhost:3001/path/to/testrunner to run your tests.\n\nCurrent Limitations\n===================\n\n- Does not support cross-domain api requests so your test suite must run with the node server. \n- Only supports Json responses.\n\nComing In Later Releases\n========================\n\n- Support for more testing frameworks in the command line\n- Integration with common CI servers(CruiseControl, Jenkins)\n","readmeFilename":"README.md","_id":"apimok@0.0.8","dist":{"shasum":"ed6b5130eba293f0ea8aca1ee1dcdeac60d97302","tarball":"https://registry.npmjs.org/apimok/-/apimok-0.0.8.tgz","integrity":"sha512-p2cc2oPPaba5/BrMJt9SNb/sTxVP6Zy6k0wHxgWyVxNiJFpLeA6tKikbhS+iaks4stYA6UbfbqHDFnAKLIe5yg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOLiWIV+lqv1tuGP2fI9sK7t45L6xwdb1Qbkj4O+DpTQIhAMf9wrFq6scuCHalHQmK/8QKSh9H5GwFzZtusY4KubF3"}]},"_npmVersion":"1.1.70","_npmUser":{"name":"rco8786","email":"rco8786@gmail.com"},"maintainers":[{"name":"rco8786","email":"rco8786@gmail.com"}],"directories":{}},"0.0.9":{"name":"apimok","description":"Mock web API requests for use in front-end testing","version":"0.0.9","dependencies":{"express":"3.x","optimist":"0.3.x"},"bin":{"apimok":"./bin/apimok"},"readme":"Apimok\n======\n\nMock web API requests with Nodejs for use in front-end testing.  \nAllows you to write tests that run all the way up to the API endpoint for deep integration testing.\n\nSupports any browser-based Javascript testing framework.  Currently has command line(via PhantomJS) support for Jasmine.\n\nRequirements\n============\n\nNodejs, PhantomJS, and NPM.\n\nInstallation\n============\n\napimok is available as a package via NPM.  This is the recommended way to install and update Apimok.\n\n    npm install apimok\n    \nUsage\n=====\n\nTo pull the apimok client library into your test runner:\n\n    <script src=\"http://localhost:3001/apimok-lib\"></script>\n\nThis will automatically pull the current client library into your page. Note that the apimok server runs on port 3001 by default(configurable from command line using the -p flag).\n\nIf you are running Jasmine, use the following as a template for your SpecRunner.html.  It pulls in both the client library and the JUnitXmlReport(required).\n\n    <!DOCTYPE HTML>\n    <html>\n    <head>\n      <title>Jasmine Spec Runner</title>\n\n      <link rel=\"stylesheet\" type=\"text/css\" href=\"lib/jasmine-1.3.1/jasmine.css\">\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine.js\"></script>\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine-html.js\"></script>  \n      <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\n\n      <!-- ApiMok library REQUIRED-->\n      <script type=\"text/javascript\" src=\"http://localhost:3001/apimok-lib\"></script>\n      \n      <!-- JUnitXmlReporter REQUIRED -->\n      <script type=\"text/javascript\" src=\"http://localhost:3001/junit-xml-reporter\"></script>\n\n      <!-- include source files here... -->\n      <script type=\"text/javascript\" src=\"src/Player.js\"></script>\n\n      <!-- include spec files here... -->\n      <script type=\"text/javascript\" src=\"spec/PlayerSpec.js\"></script>\n\n      <script type=\"text/javascript\">\n      (function() {    \n\n        var currentWindowOnload = window.onload;\n\n        window.onload = function() {\n          if (currentWindowOnload) {\n            currentWindowOnload();\n          }\n          execJasmine();\n        };\n\n        function execJasmine() {\n          jasmine.getEnv().addReporter(new jasmine.TrivialReporter());  //REQUIRED\n          jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter()); //REQUIRED\n          jasmine.getEnv().execute();\n        }\n\n       })();\n       </script>\n\n    </head>\n    <body>\n    </body>\n    </html>\n\n\n*Create a new mok*\n\n    var mokServer = new ApiMok(port[optional]);\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'GET',\n        returnValue: {\n            id: 1,\n            name: 'Test'\n        }\n    });\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'POST',\n        returnValue: {\n            success: true\n        }\n    });\n\nNow anytime your code hits the endpoint at 'api/test' using a 'GET' request, the object assigned to returnValue will be returned as Json.  Same with the POST below it.\n\n*Remove moks*\n\n    mokServer.destroyMoks();\n    \nThis will remove all moks that are currently stored in the server.  Generally part of a TearDown sequence.\n\nCheck out the /samples directory for some working examples.\n\nRunning Tests\n=============\n\nCurrently, cross-domain requests are not supported.  This poses 2 limitations: 1) API requests must be relative to your application in order to be mocked.  (a call to \"http://api.yourmain.com/user\" cannot be mocked).  2) Your test specs must be included somewhere under your app's root direction(this is typical anyway).\n\nA solution to #1 will be available in a later relase, as there is more involved than simply enabling cross-domain requests.  For #2, the apimok node module also serves as a static file server.  All you have to do is tell it where your application is when you start the server:\n\n    cd /path/to/application\n    apimok --with jasmine --target app-test/specrunner.html\n    \nTo see all options run _apimok_.\n\nApimok will now spin up its server and run all the tests at http://localhost:3001/app-test/specrunner.html using PhantomJs.  Output will appear in the console.\n\nIf you prefer to run the server and browse to the output page(or you are using a framework that is NOT Jasmine) in your browser, use the _-m_ flag.  With the server running, open your test output page in the browser by going to http://localhost:3001/path/to/testrunner to run your tests.\n\nCurrent Limitations\n===================\n\n- Does not support cross-domain api requests so your test suite must run with the node server. \n- Only supports Json responses.\n\nComing In Later Releases\n========================\n\n- Support for more testing frameworks in the command line\n- Integration with common CI servers(CruiseControl, Jenkins)\n","readmeFilename":"README.md","_id":"apimok@0.0.9","dist":{"shasum":"71c274d337c89171d51985e08631772dbfe77988","tarball":"https://registry.npmjs.org/apimok/-/apimok-0.0.9.tgz","integrity":"sha512-FOJGkSrQl7bIB+0SE8WHpuvqqznh2W1qbxVKFla1HQcOHTEefmSevcuk1m+PbWRRdzGOm7WuDDfYjXo+s2teMg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDh9Pp4PpZP2Qx5+bt11g4DqAo7MaGqo23sX5gRVqtttAiBV9W+hxJDYRlp/Q73bYTCyd/Vt1PN9jpFsdHhCBbwA1Q=="}]},"_npmVersion":"1.1.70","_npmUser":{"name":"rco8786","email":"rco8786@gmail.com"},"maintainers":[{"name":"rco8786","email":"rco8786@gmail.com"}],"directories":{}},"0.1.0":{"name":"apimok","description":"Mock web API requests for use in front-end testing","version":"0.1.0","dependencies":{"express":"3.x","optimist":"0.3.x"},"bin":{"apimok":"./bin/apimok"},"readme":"Apimok\n======\n\nMock web API requests with Nodejs for use in front-end testing.  \nAllows you to write tests that run all the way up to the API endpoint for deep integration testing.\n\nSupports any browser-based Javascript testing framework.  Currently has command line(via PhantomJS) support for Jasmine.\n\nRequirements\n============\n\nNodejs, PhantomJS, and NPM.\n\nInstallation\n============\n\napimok is available as a package via NPM.  This is the recommended way to install and update Apimok.\n\n    npm install apimok\n    \nUsage\n=====\n\nTo pull the apimok client library into your test runner:\n\n    <script src=\"http://localhost:3001/apimok-lib\"></script>\n\nThis will automatically pull the current client library into your page. Note that the apimok server runs on port 3001 by default(configurable from command line using the -p flag).\n\nIf you are running Jasmine, use the following as a template for your SpecRunner.html.  It pulls in both the client library and the JUnitXmlReport(required).\n\n    <!DOCTYPE HTML>\n    <html>\n    <head>\n      <title>Jasmine Spec Runner</title>\n\n      <link rel=\"stylesheet\" type=\"text/css\" href=\"lib/jasmine-1.3.1/jasmine.css\">\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine.js\"></script>\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine-html.js\"></script>  \n      <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\n\n      <!-- ApiMok library REQUIRED-->\n      <script type=\"text/javascript\" src=\"http://localhost:3001/apimok-lib\"></script>\n      \n      <!-- JUnitXmlReporter REQUIRED -->\n      <script type=\"text/javascript\" src=\"http://localhost:3001/junit-xml-reporter\"></script>\n\n      <!-- include source files here... -->\n      <script type=\"text/javascript\" src=\"src/Player.js\"></script>\n\n      <!-- include spec files here... -->\n      <script type=\"text/javascript\" src=\"spec/PlayerSpec.js\"></script>\n\n      <script type=\"text/javascript\">\n      (function() {    \n\n        var currentWindowOnload = window.onload;\n\n        window.onload = function() {\n          if (currentWindowOnload) {\n            currentWindowOnload();\n          }\n          execJasmine();\n        };\n\n        function execJasmine() {\n          jasmine.getEnv().addReporter(new jasmine.TrivialReporter());  //REQUIRED\n          jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter()); //REQUIRED\n          jasmine.getEnv().execute();\n        }\n\n       })();\n       </script>\n\n    </head>\n    <body>\n    </body>\n    </html>\n\n\n*Create a new mok*\n\n    var mokServer = new ApiMok(port[optional]);\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'GET',\n        returnValue: {\n            id: 1,\n            name: 'Test'\n        }\n    });\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'POST',\n        returnValue: {\n            success: true\n        }\n    });\n\nNow anytime your code hits the endpoint at 'api/test' using a 'GET' request, the object assigned to returnValue will be returned as Json.  Same with the POST below it.\n\n*Remove moks*\n\n    mokServer.destroyMoks();\n    \nThis will remove all moks that are currently stored in the server.  Generally part of a TearDown sequence.\n\nCheck out the /samples directory for some working examples.\n\nRunning Tests\n=============\n\nCurrently, cross-domain requests are not supported.  This poses 2 limitations: 1) API requests must be relative to your application in order to be mocked.  (a call to \"http://api.yourmain.com/user\" cannot be mocked).  2) Your test specs must be included somewhere under your app's root direction(this is typical anyway).\n\nA solution to #1 will be available in a later relase, as there is more involved than simply enabling cross-domain requests.  For #2, the apimok node module also serves as a static file server.  All you have to do is tell it where your application is when you start the server:\n\n    cd /path/to/application\n    apimok --with jasmine --target app-test/specrunner.html\n    \nTo see all options run _apimok_.\n\nApimok will now spin up its server and run all the tests at http://localhost:3001/app-test/specrunner.html using PhantomJs.  Output will appear in the console.\n\nIf you prefer to run the server and browse to the output page(or you are using a framework that is NOT Jasmine) in your browser, use the _-m_ flag.  With the server running, open your test output page in the browser by going to http://localhost:3001/path/to/testrunner to run your tests.\n\nCurrent Limitations\n===================\n\n- Does not support cross-domain api requests so your test suite must run with the node server. \n- Only supports Json responses.\n\nComing In Later Releases\n========================\n\n- Support for more testing frameworks in the command line\n- Integration with common CI servers(CruiseControl, Jenkins)\n","readmeFilename":"README.md","_id":"apimok@0.1.0","dist":{"shasum":"aec9d4e0f9a26f9d62ae355dd80cd77ff50f0172","tarball":"https://registry.npmjs.org/apimok/-/apimok-0.1.0.tgz","integrity":"sha512-D+ZnjG5uOpWEz2DKV0N9T072ie7ckwotPeCMba/lRwOzp8/FciFeqeze520gVALxAy5qvbEeolSutCNeZhETHQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDeuEpDUoGMl0JfD8S5pupMAzPMzuw7N5dBJxojY29YJAiAS/alKqKb4ruyC7baaloDmlKWbzJgm50g/vifVgrWJgw=="}]},"_npmVersion":"1.1.70","_npmUser":{"name":"rco8786","email":"rco8786@gmail.com"},"maintainers":[{"name":"rco8786","email":"rco8786@gmail.com"}],"directories":{}},"0.1.1":{"name":"apimok","description":"Mock web API requests for use in front-end testing","version":"0.1.1","dependencies":{"express":"3.x","optimist":"0.3.x"},"bin":{"apimok":"./bin/apimok"},"readme":"Apimok\n======\n\nMock web API requests with Nodejs for use in front-end testing.  \nAllows you to write tests that run all the way up to the API endpoint for deep integration testing.\n\nSupports any browser-based Javascript testing framework.  Currently has command line(via PhantomJS) support for Jasmine.\n\nRequirements\n============\n\nNodejs, PhantomJS, and NPM.\n\nInstallation\n============\n\napimok is available as a package via NPM.  This is the recommended way to install and update Apimok.\n\n    npm install apimok\n    \nUsage\n=====\n\nTo pull the apimok client library into your test runner:\n\n    <script src=\"http://localhost:3001/apimok-lib\"></script>\n\nThis will automatically pull the current client library into your page. Note that the apimok server runs on port 3001 by default(configurable from command line using the -p flag).\n\nIf you are running Jasmine, use the following as a template for your SpecRunner.html.  It pulls in both the client library and the JUnitXmlReport(required).\n\n    <!DOCTYPE HTML>\n    <html>\n    <head>\n      <title>Jasmine Spec Runner</title>\n\n      <link rel=\"stylesheet\" type=\"text/css\" href=\"lib/jasmine-1.3.1/jasmine.css\">\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine.js\"></script>\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine-html.js\"></script>  \n      <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\n\n      <!-- ApiMok library REQUIRED-->\n      <script type=\"text/javascript\" src=\"http://localhost:3001/apimok-lib\"></script>\n      \n      <!-- JUnitXmlReporter REQUIRED -->\n      <script type=\"text/javascript\" src=\"http://localhost:3001/junit-xml-reporter\"></script>\n\n      <!-- include source files here... -->\n      <script type=\"text/javascript\" src=\"src/Player.js\"></script>\n\n      <!-- include spec files here... -->\n      <script type=\"text/javascript\" src=\"spec/PlayerSpec.js\"></script>\n\n      <script type=\"text/javascript\">\n      (function() {    \n\n        var currentWindowOnload = window.onload;\n\n        window.onload = function() {\n          if (currentWindowOnload) {\n            currentWindowOnload();\n          }\n          execJasmine();\n        };\n\n        function execJasmine() {\n          jasmine.getEnv().addReporter(new jasmine.TrivialReporter());  //REQUIRED\n          jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter()); //REQUIRED\n          jasmine.getEnv().execute();\n        }\n\n       })();\n       </script>\n\n    </head>\n    <body>\n    </body>\n    </html>\n\n\n*Create a new mok*\n\n    var mokServer = new ApiMok(port[optional]);\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'GET',\n        returnValue: {\n            id: 1,\n            name: 'Test'\n        }\n    });\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'POST',\n        returnValue: {\n            success: true\n        }\n    });\n\nNow anytime your code hits the endpoint at 'api/test' using a 'GET' request, the object assigned to returnValue will be returned as Json.  Same with the POST below it.\n\n*Remove moks*\n\n    mokServer.destroyMoks();\n    \nThis will remove all moks that are currently stored in the server.  Generally part of a TearDown sequence.\n\nCheck out the /samples directory for some working examples.\n\nRunning Tests\n=============\n\nCurrently, cross-domain requests are not supported.  This poses 2 limitations: 1) API requests must be relative to your application in order to be mocked.  (a call to \"http://api.yourmain.com/user\" cannot be mocked).  2) Your test specs must be included somewhere under your app's root direction(this is typical anyway).\n\nA solution to #1 will be available in a later relase, as there is more involved than simply enabling cross-domain requests.  For #2, the apimok node module also serves as a static file server.  All you have to do is tell it where your application is when you start the server:\n\n    cd /path/to/application\n    apimok --with jasmine --target app-test/specrunner.html\n    \nTo see all options run _apimok_.\n\nApimok will now spin up its server and run all the tests at http://localhost:3001/app-test/specrunner.html using PhantomJs.  Output will appear in the console.\n\nIf you prefer to run the server and browse to the output page(or you are using a framework that is NOT Jasmine) in your browser, use the _-m_ flag.  With the server running, open your test output page in the browser by going to http://localhost:3001/path/to/testrunner to run your tests.\n\nCurrent Limitations\n===================\n\n- Does not support cross-domain api requests so your test suite must run with the node server. \n- Only supports Json responses.\n\nComing In Later Releases\n========================\n\n- Support for more testing frameworks in the command line\n- Integration with common CI servers(CruiseControl, Jenkins)\n","readmeFilename":"README.md","_id":"apimok@0.1.1","dist":{"shasum":"2c2afb8c0443209835bfa8f2657f11b5de1dfd66","tarball":"https://registry.npmjs.org/apimok/-/apimok-0.1.1.tgz","integrity":"sha512-NowKbzheppNE2NctHuZxucfXyHIvKKlA34Ez1XGuAkBi0qd1hehf9ft7SANTNeMerzfSB6armdauD3PKzO/r0A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIATjvs6l8FW3WJTJvPwE3hj+ffQJPMQoTZ9mIcV0CHubAiBtUDEnYlPL20YTdlgnKf3Emcn1w4RGPmVnKhnKzJMXYg=="}]},"_npmVersion":"1.1.70","_npmUser":{"name":"rco8786","email":"rco8786@gmail.com"},"maintainers":[{"name":"rco8786","email":"rco8786@gmail.com"}],"directories":{}},"0.1.3":{"name":"apimok","description":"Mock web API requests for use in front-end testing","version":"0.1.3","dependencies":{"express":"3.x","optimist":"0.3.x"},"bin":{"apimok":"./bin/apimok"},"readme":"Apimok\n======\n\nMock web API requests with Nodejs for use in front-end testing.  \nAllows you to write tests that run all the way up to the API endpoint for deep integration testing.\n\nSupports any browser-based Javascript testing framework.  Currently has command line(via PhantomJS) support for Jasmine.\n\nRequirements\n============\n\nNodejs, PhantomJS, and NPM.\n\nInstallation\n============\n\napimok is available as a package via NPM.  This is the recommended way to install and update Apimok.\n\n    npm install apimok\n    \nUsage\n=====\n\nTo pull the apimok client library into your test runner:\n\n    <script src=\"/apimok-lib\"></script>\n\nThis will automatically pull the current client library into your page. Note that the apimok server runs on port 3001 by default(configurable from command line using the -p flag).\n\nIf you are running Jasmine, use the following as a template for your SpecRunner.html.  It pulls in both the client library and the JUnitXmlReport(required).\n\n    <!DOCTYPE HTML>\n    <html>\n    <head>\n      <title>Jasmine Spec Runner</title>\n\n      <link rel=\"stylesheet\" type=\"text/css\" href=\"lib/jasmine-1.3.1/jasmine.css\">\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine.js\"></script>\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine-html.js\"></script>  \n      <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\n\n      <!-- ApiMok library REQUIRED-->\n      <script type=\"text/javascript\" src=\"/apimok-lib\"></script>\n      \n      <!-- JUnitXmlReporter REQUIRED -->\n      <script type=\"text/javascript\" src=\"/junit-xml-reporter\"></script>\n\n      <!-- include source files here... -->\n      <script type=\"text/javascript\" src=\"src/Player.js\"></script>\n\n      <!-- include spec files here... -->\n      <script type=\"text/javascript\" src=\"spec/PlayerSpec.js\"></script>\n\n      <script type=\"text/javascript\">\n      (function() {    \n\n        var currentWindowOnload = window.onload;\n\n        window.onload = function() {\n          if (currentWindowOnload) {\n            currentWindowOnload();\n          }\n          execJasmine();\n        };\n\n        function execJasmine() {\n          jasmine.getEnv().addReporter(new jasmine.TrivialReporter());  //REQUIRED\n          jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter()); //REQUIRED\n          jasmine.getEnv().execute();\n        }\n\n       })();\n       </script>\n\n    </head>\n    <body>\n    </body>\n    </html>\n\n\n*Create a new mok*\n\n    var mokServer = new ApiMok(port[optional]);\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'GET',\n        returnValue: {\n            id: 1,\n            name: 'Test'\n        }\n    });\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'POST',\n        returnValue: {\n            success: true\n        }\n    });\n\nNow anytime your code hits the endpoint at 'api/test' using a 'GET' request, the object assigned to returnValue will be returned as Json.  Same with the POST below it.\n\n*Remove moks*\n\n    mokServer.destroyMoks();\n    \nThis will remove all moks that are currently stored in the server.  Generally part of a TearDown sequence.\n\nCheck out the /samples directory for some working examples.\n\nRunning Tests\n=============\n\nCurrently, cross-domain requests are not supported.  This poses 2 limitations: 1) API requests must be relative to your application in order to be mocked.  (a call to \"http://api.yourmain.com/user\" cannot be mocked).  2) Your test specs must be included somewhere under your app's root direction(this is typical anyway).\n\nA solution to #1 will be available in a later relase, as there is more involved than simply enabling cross-domain requests.  For #2, the apimok node module also serves as a static file server.  All you have to do is tell it where your application is when you start the server:\n\n    cd /path/to/application\n    apimok --with jasmine --target app-test/specrunner.html\n    \nTo see all options run _apimok_.\n\nApimok will now spin up its server and run all the tests at http://localhost:3001/app-test/specrunner.html using PhantomJs.  Output will appear in the console.\n\nIf you prefer to run the server and browse to the output page(or you are using a framework that is NOT Jasmine) in your browser, use the _-m_ flag.  With the server running, open your test output page in the browser by going to http://localhost:3001/path/to/testrunner to run your tests.\n\nCurrent Limitations\n===================\n\n- Does not support cross-domain api requests so your test suite must run with the node server. \n- Only supports Json responses.\n\nComing In Later Releases\n========================\n\n- Support for more testing frameworks in the command line\n- Integration with common CI servers(CruiseControl, Jenkins)\n","readmeFilename":"README.md","_id":"apimok@0.1.3","dist":{"shasum":"c9cb2181e5b3e8d576fe640ca573438c20a3cd42","tarball":"https://registry.npmjs.org/apimok/-/apimok-0.1.3.tgz","integrity":"sha512-8PO+KW9a+7EA1Tq9J+iDEHyyZkyGhYWZD7BrwZHr6clIpy8iPwN0vShrOuaisyVATLLK8DmFANedsUvJwIAQLw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEcoR6QlXbtTp46hIFBkvM8oJRf5X7wZD8ilhxpGoTifAiB46kbKgxR/y43K2xtDawVi7+a6E9FvNPlydyWkuFYu8g=="}]},"_npmVersion":"1.1.70","_npmUser":{"name":"rco8786","email":"rco8786@gmail.com"},"maintainers":[{"name":"rco8786","email":"rco8786@gmail.com"}],"directories":{}},"0.1.4":{"name":"apimok","description":"Mock web API requests for use in front-end testing","version":"0.1.4","dependencies":{"express":"3.x","optimist":"0.3.x"},"bin":{"apimok":"./bin/apimok"},"readme":"Apimok\n======\n\nMock web API requests with Nodejs for use in front-end testing.  \nAllows you to write tests that run all the way up to the API endpoint for deep integration testing.\n\nSupports any browser-based Javascript testing framework.  Currently has command line(via PhantomJS) support for Jasmine.\n\nRequirements\n============\n\nNodejs, PhantomJS, and NPM.\n\nInstallation\n============\n\napimok is available as a package via NPM.  This is the recommended way to install and update Apimok.\n\n    npm install apimok\n    \nUsage\n=====\n\nTo pull the apimok client library into your test runner:\n\n    <script src=\"/apimok-lib\"></script>\n\nThis will automatically pull the current client library into your page. Note that the apimok server runs on port 3001 by default(configurable from command line using the -p flag).\n\nIf you are running Jasmine, use the following as a template for your SpecRunner.html.  It pulls in both the client library and the JUnitXmlReport(required).\n\n    <!DOCTYPE HTML>\n    <html>\n    <head>\n      <title>Jasmine Spec Runner</title>\n\n      <link rel=\"stylesheet\" type=\"text/css\" href=\"lib/jasmine-1.3.1/jasmine.css\">\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine.js\"></script>\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine-html.js\"></script>  \n      <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\n\n      <!-- ApiMok library REQUIRED-->\n      <script type=\"text/javascript\" src=\"/apimok-lib\"></script>\n      \n      <!-- JUnitXmlReporter REQUIRED -->\n      <script type=\"text/javascript\" src=\"/junit-xml-reporter\"></script>\n\n      <!-- include source files here... -->\n      <script type=\"text/javascript\" src=\"src/Player.js\"></script>\n\n      <!-- include spec files here... -->\n      <script type=\"text/javascript\" src=\"spec/PlayerSpec.js\"></script>\n\n      <script type=\"text/javascript\">\n      (function() {    \n\n        var currentWindowOnload = window.onload;\n\n        window.onload = function() {\n          if (currentWindowOnload) {\n            currentWindowOnload();\n          }\n          execJasmine();\n        };\n\n        function execJasmine() {\n          jasmine.getEnv().addReporter(new jasmine.TrivialReporter());  //REQUIRED\n          jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter()); //REQUIRED\n          jasmine.getEnv().execute();\n        }\n\n       })();\n       </script>\n\n    </head>\n    <body>\n    </body>\n    </html>\n\n\n*Create a new mok*\n\n    var mokServer = new ApiMok(port[optional]);\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'GET',\n        returnValue: {\n            id: 1,\n            name: 'Test'\n        }\n    });\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'POST',\n        returnValue: {\n            success: true\n        }\n    });\n\nNow anytime your code hits the endpoint at 'api/test' using a 'GET' request, the object assigned to returnValue will be returned as Json.  Same with the POST below it.\n\n*Remove moks*\n\n    mokServer.destroyMoks();\n    \nThis will remove all moks that are currently stored in the server.  Generally part of a TearDown sequence.\n\nCheck out the /samples directory for some working examples.\n\nRunning Tests\n=============\n\nCurrently, cross-domain requests are not supported.  This poses 2 limitations: 1) API requests must be relative to your application in order to be mocked.  (a call to \"http://api.yourmain.com/user\" cannot be mocked).  2) Your test specs must be included somewhere under your app's root direction(this is typical anyway).\n\nA solution to #1 will be available in a later relase, as there is more involved than simply enabling cross-domain requests.  For #2, the apimok node module also serves as a static file server.  All you have to do is tell it where your application is when you start the server:\n\n    cd /path/to/application\n    apimok --with jasmine --target app-test/specrunner.html\n    \nTo see all options run _apimok_.\n\nApimok will now spin up its server and run all the tests at http://localhost:3001/app-test/specrunner.html using PhantomJs.  Output will appear in the console.\n\nIf you prefer to run the server and browse to the output page(or you are using a framework that is NOT Jasmine) in your browser, use the _-m_ flag.  With the server running, open your test output page in the browser by going to http://localhost:3001/path/to/testrunner to run your tests.\n\nCurrent Limitations\n===================\n\n- Does not support cross-domain api requests so your test suite must run with the node server. \n- Only supports Json responses.\n\nComing In Later Releases\n========================\n\n- Support for more testing frameworks in the command line\n- Integration with common CI servers(CruiseControl, Jenkins)\n","readmeFilename":"README.md","_id":"apimok@0.1.4","dist":{"shasum":"8e73672aa614b5a8437f1e02c96053ab1577c8bb","tarball":"https://registry.npmjs.org/apimok/-/apimok-0.1.4.tgz","integrity":"sha512-xzn3aFtmGJh+lo1YSXqJCmC/1U4WY5J5cRsxTyJLOzgVAK4HsP2bTy/EsFm77QM6rLEbtaXAOLjHKV9W0DJa+w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCa1I3L3VfZ9MPSqnL991cLqkasAzw4O0+hGhnaUda66wIhAOWs4Sz0XtwobHto3q/LpPt0ZSIbmPXbe5qums7Zgiiw"}]},"_npmVersion":"1.1.70","_npmUser":{"name":"rco8786","email":"rco8786@gmail.com"},"maintainers":[{"name":"rco8786","email":"rco8786@gmail.com"}],"directories":{}},"0.1.5":{"name":"apimok","description":"Mock web API requests for use in front-end testing","version":"0.1.5","dependencies":{"express":"3.x","optimist":"0.3.x"},"bin":{"apimok":"./bin/apimok"},"readme":"Apimok\n======\n\nMock web API requests with Nodejs for use in front-end testing.  \nAllows you to write tests that run all the way up to the API endpoint for deep integration testing.\n\nSupports any browser-based Javascript testing framework.  Currently has command line(via PhantomJS) support for Jasmine.\n\nRequirements\n============\n\nNodejs, PhantomJS, and NPM.\n\nInstallation\n============\n\napimok is available as a package via NPM.  This is the recommended way to install and update Apimok.\n\n    npm install apimok\n    \nUsage\n=====\n\nTo pull the apimok client library into your test runner:\n\n    <script src=\"/apimok-lib\"></script>\n\nThis will automatically pull the current client library into your page. Note that the apimok server runs on port 3001 by default(configurable from command line using the -p flag).\n\nIf you are running Jasmine, use the following as a template for your SpecRunner.html.  It pulls in both the client library and the JUnitXmlReport(required).\n\n    <!DOCTYPE HTML>\n    <html>\n    <head>\n      <title>Jasmine Spec Runner</title>\n\n      <link rel=\"stylesheet\" type=\"text/css\" href=\"lib/jasmine-1.3.1/jasmine.css\">\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine.js\"></script>\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine-html.js\"></script>  \n      <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\n\n      <!-- ApiMok library REQUIRED-->\n      <script type=\"text/javascript\" src=\"/apimok-lib\"></script>\n      \n      <!-- JUnitXmlReporter REQUIRED -->\n      <script type=\"text/javascript\" src=\"/junit-xml-reporter\"></script>\n\n      <!-- include source files here... -->\n      <script type=\"text/javascript\" src=\"src/Player.js\"></script>\n\n      <!-- include spec files here... -->\n      <script type=\"text/javascript\" src=\"spec/PlayerSpec.js\"></script>\n\n      <script type=\"text/javascript\">\n      (function() {    \n\n        var currentWindowOnload = window.onload;\n\n        window.onload = function() {\n          if (currentWindowOnload) {\n            currentWindowOnload();\n          }\n          execJasmine();\n        };\n\n        function execJasmine() {\n          jasmine.getEnv().addReporter(new jasmine.TrivialReporter());  //REQUIRED\n          jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter()); //REQUIRED\n          jasmine.getEnv().execute();\n        }\n\n       })();\n       </script>\n\n    </head>\n    <body>\n    </body>\n    </html>\n\n\n*Create a new mok*\n\n    var mokServer = new ApiMok(port[optional]);\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'GET',\n        returnValue: {\n            id: 1,\n            name: 'Test'\n        }\n    });\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'POST',\n        returnValue: {\n            success: true\n        }\n    });\n\nNow anytime your code hits the endpoint at 'api/test' using a 'GET' request, the object assigned to returnValue will be returned as Json.  Same with the POST below it.\n\n*Remove moks*\n\n    mokServer.destroyMoks();\n    \nThis will remove all moks that are currently stored in the server.  Generally part of a TearDown sequence.\n\nCheck out the /samples directory for some working examples.\n\nRunning Tests\n=============\n\nCurrently, cross-domain requests are not supported.  This poses 2 limitations: 1) API requests must be relative to your application in order to be mocked.  (a call to \"http://api.yourmain.com/user\" cannot be mocked).  2) Your test specs must be included somewhere under your app's root direction(this is typical anyway).\n\nA solution to #1 will be available in a later relase, as there is more involved than simply enabling cross-domain requests.  For #2, the apimok node module also serves as a static file server.  All you have to do is tell it where your application is when you start the server:\n\n    cd /path/to/application\n    apimok --with jasmine --target app-test/specrunner.html\n    \nTo see all options run _apimok_.\n\nApimok will now spin up its server and run all the tests at http://localhost:3001/app-test/specrunner.html using PhantomJs.  Output will appear in the console.\n\nIf you prefer to run the server and browse to the output page(or you are using a framework that is NOT Jasmine) in your browser, use the _-m_ flag.  With the server running, open your test output page in the browser by going to http://localhost:3001/path/to/testrunner to run your tests.\n\nCurrent Limitations\n===================\n\n- Does not support cross-domain api requests so your test suite must run with the node server. \n- Only supports Json responses.\n\nComing In Later Releases\n========================\n\n- Support for more testing frameworks in the command line\n- Integration with common CI servers(CruiseControl, Jenkins)\n","readmeFilename":"README.md","_id":"apimok@0.1.5","dist":{"shasum":"a00cd06ac91c919a97ffc581d40b6ce53ac2883e","tarball":"https://registry.npmjs.org/apimok/-/apimok-0.1.5.tgz","integrity":"sha512-eNK4iGwz+gTr/0Nb1J4xwqQoY+V20QiOgqpykRXD08bkVY8oq0xF1ESC199BDErPAfyRjNnzvHQ9Hb97gG9YdA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDk/asHExWjhTpbTghli4F9QrEutAhjNJdrjxUpt0uYbAiBMmxNp8qe3vJgRd0Ovf5wl9ihUy5eNFkN82ea8dsUU5Q=="}]},"_npmVersion":"1.1.70","_npmUser":{"name":"rco8786","email":"rco8786@gmail.com"},"maintainers":[{"name":"rco8786","email":"rco8786@gmail.com"}],"directories":{}},"0.1.7":{"name":"apimok","description":"Mock web API requests for use in front-end testing","version":"0.1.7","dependencies":{"express":"3.x","optimist":"0.3.x"},"bin":{"apimok":"./bin/apimok"},"readme":"Apimok\n======\n\nMock web API requests with Nodejs for use in front-end testing.  \nAllows you to write tests that run all the way up to the API endpoint for deep integration testing.\n\nSupports any browser-based Javascript testing framework.  Currently has command line(via PhantomJS) support for Jasmine.\n\nRequirements\n============\n\nNodejs, PhantomJS, and NPM.\n\nInstallation\n============\n\napimok is available as a package via NPM.  This is the recommended way to install and update Apimok.\n\n    npm install apimok\n    \nUsage\n=====\n\nTo pull the apimok client library into your test runner:\n\n    <script src=\"/apimok-lib\"></script>\n\nThis will automatically pull the current client library into your page. Note that the apimok server runs on port 3001 by default(configurable from command line using the -p flag).\n\nIf you are running Jasmine, use the following as a template for your SpecRunner.html.  It pulls in both the client library and the JUnitXmlReport(required).\n\n    <!DOCTYPE HTML>\n    <html>\n    <head>\n      <title>Jasmine Spec Runner</title>\n\n      <link rel=\"stylesheet\" type=\"text/css\" href=\"lib/jasmine-1.3.1/jasmine.css\">\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine.js\"></script>\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine-html.js\"></script>  \n      <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\n\n      <!-- ApiMok library REQUIRED-->\n      <script type=\"text/javascript\" src=\"/apimok-lib\"></script>\n      \n      <!-- JUnitXmlReporter REQUIRED -->\n      <script type=\"text/javascript\" src=\"/junit-xml-reporter\"></script>\n\n      <!-- include source files here... -->\n      <script type=\"text/javascript\" src=\"src/Player.js\"></script>\n\n      <!-- include spec files here... -->\n      <script type=\"text/javascript\" src=\"spec/PlayerSpec.js\"></script>\n\n      <script type=\"text/javascript\">\n      (function() {    \n\n        var currentWindowOnload = window.onload;\n\n        window.onload = function() {\n          if (currentWindowOnload) {\n            currentWindowOnload();\n          }\n          execJasmine();\n        };\n\n        function execJasmine() {\n          jasmine.getEnv().addReporter(new jasmine.TrivialReporter());  //REQUIRED\n          jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter()); //REQUIRED\n          jasmine.getEnv().execute();\n        }\n\n       })();\n       </script>\n\n    </head>\n    <body>\n    </body>\n    </html>\n\n\n*Create a new mok*\n\n    var mokServer = new ApiMok(port[optional]);\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'GET',\n        returnValue: {\n            id: 1,\n            name: 'Test'\n        }\n    });\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'POST',\n        returnValue: {\n            success: true\n        }\n    });\n\nNow anytime your code hits the endpoint at 'api/test' using a 'GET' request, the object assigned to returnValue will be returned as Json.  Same with the POST below it.\n\n*Remove moks*\n\n    mokServer.destroyMoks();\n    \nThis will remove all moks that are currently stored in the server.  Generally part of a TearDown sequence.\n\nCheck out the /samples directory for some working examples.\n\nRunning Tests\n=============\n\nCurrently, cross-domain requests are not supported.  This poses 2 limitations: 1) API requests must be relative to your application in order to be mocked.  (a call to \"http://api.yourmain.com/user\" cannot be mocked).  2) Your test specs must be included somewhere under your app's root direction(this is typical anyway).\n\nA solution to #1 will be available in a later relase, as there is more involved than simply enabling cross-domain requests.  For #2, the apimok node module also serves as a static file server.  All you have to do is tell it where your application is when you start the server:\n\n    cd /path/to/application\n    apimok --with jasmine --target app-test/specrunner.html\n    \nTo see all options run _apimok_.\n\nApimok will now spin up its server and run all the tests at http://localhost:3001/app-test/specrunner.html using PhantomJs.  Output will appear in the console.\n\nIf you prefer to run the server and browse to the output page(or you are using a framework that is NOT Jasmine) in your browser, use the _-m_ flag.  With the server running, open your test output page in the browser by going to http://localhost:3001/path/to/testrunner to run your tests.\n\nCurrent Limitations\n===================\n\n- Does not support cross-domain api requests so your test suite must run with the node server. \n- Only supports Json responses.\n\nComing In Later Releases\n========================\n\n- Support for more testing frameworks in the command line\n- Integration with common CI servers(CruiseControl, Jenkins)\n","readmeFilename":"README.md","_id":"apimok@0.1.7","dist":{"shasum":"f2f5dc922812c124fa332b56e27c495ca4b02cc7","tarball":"https://registry.npmjs.org/apimok/-/apimok-0.1.7.tgz","integrity":"sha512-K7MOcWogtXVDhk+qwc4Qhlt1niJHzXC2kR3rq/Mo9MbCraGeZi1XHkAYTVlhgFqyu7rOSWF/VNwTRvfu7kJbBg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID3+8W79lJUDrGKKz8ESlgE/PBfr6ZhbMRodb6mDFRKQAiEA9JcH3Ndcz3/ObNdutdLCRy9Yijj/zFOz8fMqHc17504="}]},"_npmVersion":"1.1.70","_npmUser":{"name":"rco8786","email":"rco8786@gmail.com"},"maintainers":[{"name":"rco8786","email":"rco8786@gmail.com"}],"directories":{}},"0.1.8":{"name":"apimok","description":"Mock web API requests for use in front-end testing","version":"0.1.8","dependencies":{"express":"3.x","optimist":"0.3.x"},"bin":{"apimok":"./bin/apimok"},"readme":"Apimok\n======\n\nMock web API requests with Nodejs for use in front-end testing.  \nAllows you to write tests that run all the way up to the API endpoint for deep integration testing.\n\nSupports any browser-based Javascript testing framework.  Currently has command line(via PhantomJS) support for Jasmine.\n\nRequirements\n============\n\nNodejs, PhantomJS, and NPM.\n\nInstallation\n============\n\napimok is available as a package via NPM.  This is the recommended way to install and update Apimok.\n\n    npm install apimok\n    \nUsage\n=====\n\nTo pull the apimok client library into your test runner:\n\n    <script src=\"/apimok-lib\"></script>\n\nThis will automatically pull the current client library into your page. Note that the apimok server runs on port 3001 by default(configurable from command line using the -p flag).\n\nIf you are running Jasmine, use the following as a template for your SpecRunner.html.  It pulls in both the client library and the JUnitXmlReport(required).\n\n    <!DOCTYPE HTML>\n    <html>\n    <head>\n      <title>Jasmine Spec Runner</title>\n\n      <link rel=\"stylesheet\" type=\"text/css\" href=\"lib/jasmine-1.3.1/jasmine.css\">\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine.js\"></script>\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine-html.js\"></script>  \n      <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\n\n      <!-- ApiMok library REQUIRED-->\n      <script type=\"text/javascript\" src=\"/apimok-lib\"></script>\n      \n      <!-- JUnitXmlReporter REQUIRED -->\n      <script type=\"text/javascript\" src=\"/junit-xml-reporter\"></script>\n\n      <!-- include source files here... -->\n      <script type=\"text/javascript\" src=\"src/Player.js\"></script>\n\n      <!-- include spec files here... -->\n      <script type=\"text/javascript\" src=\"spec/PlayerSpec.js\"></script>\n\n      <script type=\"text/javascript\">\n      (function() {    \n\n        var currentWindowOnload = window.onload;\n\n        window.onload = function() {\n          if (currentWindowOnload) {\n            currentWindowOnload();\n          }\n          execJasmine();\n        };\n\n        function execJasmine() {\n          jasmine.getEnv().addReporter(new jasmine.TrivialReporter());  //REQUIRED\n          jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter()); //REQUIRED\n          jasmine.getEnv().execute();\n        }\n\n       })();\n       </script>\n\n    </head>\n    <body>\n    </body>\n    </html>\n\n\n*Create a new mok*\n\n    var mokServer = new ApiMok(port[optional]);\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'GET',\n        returnValue: {\n            id: 1,\n            name: 'Test'\n        }\n    });\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'POST',\n        returnValue: {\n            success: true\n        }\n    });\n\nNow anytime your code hits the endpoint at 'api/test' using a 'GET' request, the object assigned to returnValue will be returned as Json.  Same with the POST below it.\n\n*Remove moks*\n\n    mokServer.destroyMoks();\n    \nThis will remove all moks that are currently stored in the server.  Generally part of a TearDown sequence.\n\nCheck out the /samples directory for some working examples.\n\nRunning Tests\n=============\n\nCurrently, cross-domain requests are not supported.  This poses 2 limitations: 1) API requests must be relative to your application in order to be mocked.  (a call to \"http://api.yourmain.com/user\" cannot be mocked).  2) Your test specs must be included somewhere under your app's root direction(this is typical anyway).\n\nA solution to #1 will be available in a later relase, as there is more involved than simply enabling cross-domain requests.  For #2, the apimok node module also serves as a static file server.  All you have to do is tell it where your application is when you start the server:\n\n    cd /path/to/application\n    apimok --with jasmine --target app-test/specrunner.html\n    \nTo see all options run _apimok_.\n\nApimok will now spin up its server and run all the tests at http://localhost:3001/app-test/specrunner.html using PhantomJs.  Output will appear in the console.\n\nIf you prefer to run the server and browse to the output page(or you are using a framework that is NOT Jasmine) in your browser, use the _-m_ flag.  With the server running, open your test output page in the browser by going to http://localhost:3001/path/to/testrunner to run your tests.\n\nCurrent Limitations\n===================\n\n- Does not support cross-domain api requests so your test suite must run with the node server. \n- Only supports Json responses.\n\nComing In Later Releases\n========================\n\n- Support for more testing frameworks in the command line\n- Integration with common CI servers(CruiseControl, Jenkins)\n","readmeFilename":"README.md","_id":"apimok@0.1.8","dist":{"shasum":"9e4ccdc1858d239c0d0bba021e685d853898a02d","tarball":"https://registry.npmjs.org/apimok/-/apimok-0.1.8.tgz","integrity":"sha512-xTLN2mXi3tSJOA8TALHcDxG4oXPeJoABX18nuD/ib01CVyvwf7Ic8Ei4TeecMRyeanKqzBFU8VINawPHmrYuOA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHITuui2lB8nKySm824pL6w8NkIrgiYb5z+DMJTrHOJfAiBPDcxxK84NuQjpLJ7d0MzMReQ5VpIs9XAkcR4linMxjg=="}]},"_npmVersion":"1.1.70","_npmUser":{"name":"rco8786","email":"rco8786@gmail.com"},"maintainers":[{"name":"rco8786","email":"rco8786@gmail.com"}],"directories":{}},"0.1.9":{"name":"apimok","description":"Mock web API requests for use in front-end testing","version":"0.1.9","dependencies":{"express":"3.x","optimist":"0.3.x"},"bin":{"apimok":"./bin/apimok"},"readme":"Apimok\n======\n\nMock web API requests with Nodejs for use in front-end testing.  \nAllows you to write tests that run all the way up to the API endpoint for deep integration testing.\n\nSupports any browser-based Javascript testing framework.  Currently has command line(via PhantomJS) support for Jasmine.\n\nRequirements\n============\n\nNodejs, PhantomJS, and NPM.\n\nInstallation\n============\n\napimok is available as a package via NPM.  This is the recommended way to install and update Apimok.\n\n    npm install apimok\n    \nUsage\n=====\n\nTo pull the apimok client library into your test runner:\n\n    <script src=\"/apimok-lib\"></script>\n\nThis will automatically pull the current client library into your page. Note that the apimok server runs on port 3001 by default(configurable from command line using the -p flag).\n\nIf you are running Jasmine, use the following as a template for your SpecRunner.html.  It pulls in both the client library and the JUnitXmlReporter(Optional).\n\n    <!DOCTYPE HTML>\n    <html>\n    <head>\n      <title>Jasmine Spec Runner</title>\n\n      <link rel=\"stylesheet\" type=\"text/css\" href=\"lib/jasmine-1.3.1/jasmine.css\">\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine.js\"></script>\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine-html.js\"></script>  \n      <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\n\n      <!-- ApiMok library REQUIRED-->\n      <script type=\"text/javascript\" src=\"/apimok-lib\"></script>\n      \n      <!-- JUnitXmlReporter OPTIONAL -->\n      <script type=\"text/javascript\" src=\"/junit-xml-reporter\"></script>\n\n      <!-- include source files here... -->\n      <script type=\"text/javascript\" src=\"src/Player.js\"></script>\n\n      <!-- include spec files here... -->\n      <script type=\"text/javascript\" src=\"spec/PlayerSpec.js\"></script>\n\n      <script type=\"text/javascript\">\n      (function() {    \n\n        var currentWindowOnload = window.onload;\n\n        window.onload = function() {\n          if (currentWindowOnload) {\n            currentWindowOnload();\n          }\n          execJasmine();\n        };\n\n        function execJasmine() {\n          jasmine.getEnv().addReporter(new jasmine.TrivialReporter());  //REQUIRED\n          jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter()); //OPTIONAL\n          jasmine.getEnv().execute();\n        }\n\n       })();\n       </script>\n\n    </head>\n    <body>\n    </body>\n    </html>\n\n\n*Create a new mok*\n\n    var mokServer = new ApiMok(port[optional]);\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'GET',\n        returnValue: {\n            id: 1,\n            name: 'Test'\n        }\n    });\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'POST',\n        returnValue: {\n            success: true\n        }\n    });\n\nNow anytime your code hits the endpoint at 'api/test' using a 'GET' request, the object assigned to returnValue will be returned as Json.  Same with the POST below it.\n\n*Remove moks*\n\n    mokServer.destroyMoks();\n    \nThis will remove all moks that are currently stored in the server.  Generally part of a TearDown sequence.\n\nCheck out the /samples directory for some working examples.\n\nRunning Tests\n=============\n\nCurrently, cross-domain requests are not supported.  This poses 2 limitations: 1) API requests must be relative to your application in order to be mocked.  (a call to \"http://api.yourmain.com/user\" cannot be mocked).  2) Your test specs must be included somewhere under your app's root direction(this is typical anyway).\n\nA solution to #1 will be available in a later relase, as there is more involved than simply enabling cross-domain requests.  For #2, the apimok node module also serves as a static file server.  All you have to do is tell it where your application is when you start the server:\n\n    cd /path/to/application\n    apimok --with jasmine --target app-test/specrunner.html\n    \nTo see all options run _apimok_.\n\nApimok will now spin up its server and run all the tests at http://localhost:3001/app-test/specrunner.html using PhantomJs.  Output will appear in the console.\n\nIf you prefer to run the server and browse to the output page(or you are using a framework that is NOT Jasmine) in your browser, use the _-m_ flag.  With the server running, open your test output page in the browser by going to http://localhost:3001/path/to/testrunner to run your tests.\n\nCurrent Limitations\n===================\n\n- Does not support cross-domain api requests so your test suite must run with the node server. \n- Only supports Json responses.\n\nComing In Later Releases\n========================\n\n- Support for more testing frameworks in the command line\n- Integration with common CI servers(CruiseControl, Jenkins)\n","readmeFilename":"README.md","_id":"apimok@0.1.9","dist":{"shasum":"0e20071df253f779c4e9e706676bd8ae7eec5eff","tarball":"https://registry.npmjs.org/apimok/-/apimok-0.1.9.tgz","integrity":"sha512-Bzwxer4McdmXSTUjw7YgKK+MpWJpuwpRtVn6LMV3W2mgvaRNXW/NxHHyEAQISOT9PxsasWtsHffX5Ewv64j/3w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3NwjJqu0oEBrZqOBmxF/BMtflKuNbwd3tUgNNFNhRagIgWCeoLxjIUlzoMbEDiictBtm8ggRBRc6hBnpTuH+pSoU="}]},"_npmVersion":"1.1.70","_npmUser":{"name":"rco8786","email":"rco8786@gmail.com"},"maintainers":[{"name":"rco8786","email":"rco8786@gmail.com"}],"directories":{}},"0.2.0":{"name":"apimok","description":"Mock web API requests for use in front-end testing","version":"0.2.0","dependencies":{"express":"3.x","optimist":"0.3.x"},"bin":{"apimok":"./bin/apimok"},"readme":"Apimok\n======\n\nMock web API requests with Nodejs for use in front-end testing.  \nAllows you to write tests that run all the way up to the API endpoint for deep integration testing.\n\nSupports any browser-based Javascript testing framework.  Currently has command line(via PhantomJS) support for Jasmine.\n\nRequirements\n============\n\nNodejs, PhantomJS, and NPM.\n\nInstallation\n============\n\napimok is available as a package via NPM.  This is the recommended way to install and update Apimok.\n\n    npm install apimok\n    \nUsage\n=====\n\nTo pull the apimok client library into your test runner:\n\n    <script src=\"/apimok-lib\"></script>\n\nThis will automatically pull the current client library into your page. Note that the apimok server runs on port 3001 by default(configurable from command line using the -p flag).\n\nIf you are running Jasmine, use the following as a template for your SpecRunner.html.  It pulls in both the client library and the JUnitXmlReporter(Optional).\n\n    <!DOCTYPE HTML>\n    <html>\n    <head>\n      <title>Jasmine Spec Runner</title>\n\n      <link rel=\"stylesheet\" type=\"text/css\" href=\"lib/jasmine-1.3.1/jasmine.css\">\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine.js\"></script>\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine-html.js\"></script>  \n      <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\n\n      <!-- ApiMok library REQUIRED-->\n      <script type=\"text/javascript\" src=\"/apimok-lib\"></script>\n      \n      <!-- JUnitXmlReporter OPTIONAL -->\n      <script type=\"text/javascript\" src=\"/junit-xml-reporter\"></script>\n\n      <!-- include source files here... -->\n      <script type=\"text/javascript\" src=\"src/Player.js\"></script>\n\n      <!-- include spec files here... -->\n      <script type=\"text/javascript\" src=\"spec/PlayerSpec.js\"></script>\n\n      <script type=\"text/javascript\">\n      (function() {    \n\n        var currentWindowOnload = window.onload;\n\n        window.onload = function() {\n          if (currentWindowOnload) {\n            currentWindowOnload();\n          }\n          execJasmine();\n        };\n\n        function execJasmine() {\n          jasmine.getEnv().addReporter(new jasmine.TrivialReporter());  //REQUIRED\n          jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter()); //OPTIONAL\n          jasmine.getEnv().execute();\n        }\n\n       })();\n       </script>\n\n    </head>\n    <body>\n    </body>\n    </html>\n\n\n*Create a new mok*\n\n    var mokServer = new ApiMok(port[optional]);\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'GET',\n        returnValue: {\n            id: 1,\n            name: 'Test'\n        }\n    });\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'POST',\n        returnValue: {\n            success: true\n        }\n    });\n\nNow anytime your code hits the endpoint at 'api/test' using a 'GET' request, the object assigned to returnValue will be returned as Json.  Same with the POST below it.\n\n*Remove moks*\n\n    mokServer.destroyMoks();\n    \nThis will remove all moks that are currently stored in the server.  Generally part of a TearDown sequence.\n\nCheck out the /samples directory for some working examples.\n\nRunning Tests\n=============\n\nCurrently, cross-domain requests are not supported.  This poses 2 limitations: 1) API requests must be relative to your application in order to be mocked.  (a call to \"http://api.yourmain.com/user\" cannot be mocked).  2) Your test specs must be included somewhere under your app's root direction(this is typical anyway).\n\nA solution to #1 will be available in a later relase, as there is more involved than simply enabling cross-domain requests.  For #2, the apimok node module also serves as a static file server.  All you have to do is tell it where your application is when you start the server:\n\n    cd /path/to/application\n    apimok --with jasmine --target app-test/specrunner.html\n    \nTo see all options run _apimok_.\n\nApimok will now spin up its server and run all the tests at http://localhost:3001/app-test/specrunner.html using PhantomJs.  Output will appear in the console.\n\nIf you prefer to run the server and browse to the output page(or you are using a framework that is NOT Jasmine) in your browser, use the _-m_ flag.  With the server running, open your test output page in the browser by going to http://localhost:3001/path/to/testrunner to run your tests.\n\nCurrent Limitations\n===================\n\n- Does not support cross-domain api requests so your test suite must run with the node server. \n- Only supports Json responses.\n\nComing In Later Releases\n========================\n\n- Support for more testing frameworks in the command line\n- Integration with common CI servers(CruiseControl, Jenkins)\n","readmeFilename":"README.md","_id":"apimok@0.2.0","dist":{"shasum":"64b760f32e51cf42e68a7c6be7b8f0d94653cc4f","tarball":"https://registry.npmjs.org/apimok/-/apimok-0.2.0.tgz","integrity":"sha512-0Dr3liCi6aTo9kWrSkYoZ+FFq7um8/Jq+/2kUXyhxb10+b7cAM/pSn1GXhomyEye6J931b9dQliqEPXd7kqzLA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBboPKSa16kjew++zcU0KBm1Aiv5InnP1c1Y82f4ccZjAiA1DQYwpEMaAt1RWAn2cxthBqCzApJqf8B2LfIHFz5dJA=="}]},"_npmVersion":"1.1.70","_npmUser":{"name":"rco8786","email":"rco8786@gmail.com"},"maintainers":[{"name":"rco8786","email":"rco8786@gmail.com"}],"directories":{}},"0.2.2":{"name":"apimok","description":"Mock web API requests for use in front-end testing","version":"0.2.2","dependencies":{"express":"3.x","optimist":"0.3.x"},"bin":{"apimok":"./bin/apimok"},"readme":"Apimok\n======\n\nMock web API requests with Nodejs for use in front-end testing.  \nAllows you to write tests that run all the way up to the API endpoint for deep integration testing.\n\nSupports any browser-based Javascript testing framework.  Currently has command line(via PhantomJS) support for Jasmine.\n\nRequirements\n============\n\nNodejs, PhantomJS, and NPM.\n\nInstallation\n============\n\napimok is available as a package via NPM.  This is the recommended way to install and update Apimok.\n\n    npm install apimok\n    \nUsage\n=====\n\nTo pull the apimok client library into your test runner:\n\n    <script src=\"/apimok-lib\"></script>\n\nThis will automatically pull the current client library into your page. Note that the apimok server runs on port 3001 by default(configurable from command line using the -p flag).\n\nIf you are running Jasmine, use the following as a template for your SpecRunner.html.  It pulls in both the client library and the JUnitXmlReporter(Optional).\n\n    <!DOCTYPE HTML>\n    <html>\n    <head>\n      <title>Jasmine Spec Runner</title>\n\n      <link rel=\"stylesheet\" type=\"text/css\" href=\"lib/jasmine-1.3.1/jasmine.css\">\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine.js\"></script>\n      <script type=\"text/javascript\" src=\"lib/jasmine-1.3.1/jasmine-html.js\"></script>  \n      <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\n\n      <!-- ApiMok library REQUIRED-->\n      <script type=\"text/javascript\" src=\"/apimok-lib\"></script>\n      \n      <!-- JUnitXmlReporter OPTIONAL -->\n      <script type=\"text/javascript\" src=\"/junit-xml-reporter\"></script>\n\n      <!-- include source files here... -->\n      <script type=\"text/javascript\" src=\"src/Player.js\"></script>\n\n      <!-- include spec files here... -->\n      <script type=\"text/javascript\" src=\"spec/PlayerSpec.js\"></script>\n\n      <script type=\"text/javascript\">\n      (function() {    \n\n        var currentWindowOnload = window.onload;\n\n        window.onload = function() {\n          if (currentWindowOnload) {\n            currentWindowOnload();\n          }\n          execJasmine();\n        };\n\n        function execJasmine() {\n          jasmine.getEnv().addReporter(new jasmine.TrivialReporter());  //REQUIRED\n          jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter()); //OPTIONAL\n          jasmine.getEnv().execute();\n        }\n\n       })();\n       </script>\n\n    </head>\n    <body>\n    </body>\n    </html>\n\n\n*Create a new mok*\n\n    var mokServer = new ApiMok(port[optional]);\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'GET',\n        returnValue: {\n            id: 1,\n            name: 'Test'\n        }\n    });\n    \n    mokServer.mok({\n        url: 'api/test',\n        verb: 'POST',\n        returnValue: {\n            success: true\n        }\n    });\n\nNow anytime your code hits the endpoint at 'api/test' using a 'GET' request, the object assigned to returnValue will be returned as Json.  Same with the POST below it.\n\n*Remove moks*\n\n    mokServer.destroyAll();\n    \nThis will remove all moks that are currently stored in the server.  Generally part of a TearDown sequence.\n\nCheck out the /samples directory for some working examples.\n\nRunning Tests\n=============\n\nCurrently, cross-domain requests are not supported.  This poses 2 limitations: 1) API requests must be relative to your application in order to be mocked.  (a call to \"http://api.yourmain.com/user\" cannot be mocked).  2) Your test specs must be included somewhere under your app's root direction(this is typical anyway).\n\nA solution to #1 will be available in a later relase, as there is more involved than simply enabling cross-domain requests.  For #2, the apimok node module also serves as a static file server.  All you have to do is tell it where your application is when you start the server:\n\n    cd /path/to/application\n    apimok --with jasmine --target app-test/specrunner.html\n    \nTo see all options run _apimok_.\n\nApimok will now spin up its server and run all the tests at http://localhost:3001/app-test/specrunner.html using PhantomJs.  Output will appear in the console.\n\nIf you prefer to run the server and browse to the output page(or you are using a framework that is NOT Jasmine) in your browser, use the _-m_ flag.  With the server running, open your test output page in the browser by going to http://localhost:3001/path/to/testrunner to run your tests.\n\nCurrent Limitations\n===================\n\n- Does not support cross-domain api requests so your test suite must run with the node server. \n- Only supports Json responses.\n\nComing In Later Releases\n========================\n\n- Support for more testing frameworks in the command line\n- Integration with common CI servers(CruiseControl, Jenkins)\n","readmeFilename":"README.md","_id":"apimok@0.2.2","dist":{"shasum":"1b092efa423a481ab2cd2cea01c9f78c25c99d55","tarball":"https://registry.npmjs.org/apimok/-/apimok-0.2.2.tgz","integrity":"sha512-N4n+vY8gYyosRniIzCSyUCV+gKmlUNBnRVH1gkXKUDu9fGyUMgBsuizZEpHq2B7/xo5a2IZUVslAiuGsdotV9w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAS3rdIMMBV33KsbyRa39+FMvYk4bGVbugMPKmLUu2ppAiB0EGYG8S+OJIqA82Gm7IIzezjof7FBki3JqPc/gwrLPw=="}]},"_npmVersion":"1.1.70","_npmUser":{"name":"rco8786","email":"rco8786@gmail.com"},"maintainers":[{"name":"rco8786","email":"rco8786@gmail.com"}]}},"readme":"apimok\n======\n\nMock web API requests for use in front-end testing","maintainers":[{"name":"rco8786","email":"rco8786@gmail.com"}],"time":{"modified":"2022-06-13T03:13:57.052Z","created":"2013-02-18T20:17:45.977Z","0.0.1":"2013-02-18T20:17:46.473Z","0.0.2":"2013-02-18T20:55:08.556Z","0.0.3":"2013-02-25T18:16:05.448Z","0.0.5":"2013-02-25T18:50:34.198Z","0.0.6":"2013-02-25T21:07:46.566Z","0.0.7":"2013-02-26T16:05:33.918Z","0.0.8":"2013-02-26T20:34:27.741Z","0.0.9":"2013-02-27T19:12:12.018Z","0.1.0":"2013-02-27T19:16:16.271Z","0.1.1":"2013-02-28T16:23:34.992Z","0.1.3":"2013-02-28T17:14:36.628Z","0.1.4":"2013-02-28T17:26:42.249Z","0.1.5":"2013-02-28T17:40:23.599Z","0.1.7":"2013-02-28T17:46:11.397Z","0.1.8":"2013-02-28T18:27:23.897Z","0.1.9":"2013-02-28T20:34:26.802Z","0.2.0":"2013-02-28T20:54:50.457Z","0.2.1":"2013-03-01T22:27:06.278Z","0.2.2":"2013-03-19T14:37:50.968Z"}}