{ "info": { "author": "Martin Matusiak", "author_email": "numerodix@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "purely.js\n=========\n\n.. image:: https://badge.fury.io/py/purelyjs.png\n :target: https://badge.fury.io/py/purelyjs\n\n.. image:: https://travis-ci.org/numerodix/purelyjs.png?branch=master\n :target: https://travis-ci.org/numerodix/purelyjs\n\n.. image:: https://pypip.in/license/purelyjs/badge.png\n :target: https://pypi.python.org/pypi/purelyjs/\n\n* Command line test runner with minimal hassle (only needs a javascript shell\n like node.js/rhino/spidermonkey - no browser).\n* Small library of JUnit-style testing primitives.\n\n\nQuickstart\n----------\n\n.. code:: bash\n\n $ pip install purelyjs\n $ purelyjs\n\n\nTheory\n------\n\nThe composition of a typical Javascript application tends to be a mix of\nlibrary/framework code (jQuery, Backbone, Angular.js etc) and application\nspecific code. Frameworks provide many hooks that allow the programmer to\ncustomize their behavior, which is accomplished through callbacks.\n\nThis tight coupling between the application and the framework makes it hard to\nunit test the application logic (the framework is generally known to work well\nalready, that's typically why it was chosen). Worse still, the effects of the\napplication are manifest through side effects: network calls are made, ui\ncomponents are updated etc. Many heavy weight testing frameworks have sprung up\nto address this need, and they are centered around driving a browser and\nobserving the effects (Selenium, phantomjs, etc).\n\n.. code::\n\n Application\n --------------------------------------------\n | |\n | Callback spaghetti |\n | Land of the side effect |\n | |\n --------------------------------------------\n | |\n | Pure code |\n | |\n --------------------------------------------\n\nStill, almost every application needs to perform some tasks that have no\ndependencies on network or browsers. Things like manipulating strings, numbers,\ndates, arrays, custom data structures, parsing text streams etc. This code is\nvery amenable to unit testing, because it tends to be side effect free (ie.\npure).\n\n\nTesting purely\n--------------\n\nThe basic idea behind purely is that you split out your pure code from\nyour side-effectful code and write tests against it using the primitives\npurely provides. Your stack will look like this:\n\n.. code::\n\n Stack\n --------------------------------------------\n | |\n | Tests |\n | |\n -------------------------------------------- -----\n | | |\n | purely.js | |\n | assertEqual, assertNotEqual etc... | |\n | | test\n -------------------------------------------- dependencies\n | | |\n | Pure code | |\n | | |\n -------------------------------------------- -----\n\nSince none of this code needs a browser to run, purely can run it on a\njavascript engine on the command line. First it will scan your test code to\nfind all the tests. For each test it will assemble a test module as shown below\n(a single file containing all the code, plus the invocation of that one test)\nand execute it.\n\n.. code::\n\n Test module\n -------------------------------------------- -----\n | | |\n | Pure code | |\n | | test\n -------------------------------------------- module\n | | |\n | purely.js | |\n | assertEqual, assertNotEqual etc... | V\n | |\n --------------------------------------------\n | |\n | Tests |\n | function testThis() {...} |\n | function testThat() {...} |\n | |\n --------------------------------------------\n | |\n | testThis(); |\n | |\n --------------------------------------------\n\n\nUsage\n-----\n\nRun ``purelyjs`` with command line arguments:\n\n.. code:: bash\n\n $ purelyjs --test test/test_asserts.js\n Running 10 tests on /usr/bin/js\n ..........\n\n ----------------------------------------------------------------------\n Ran 10 tests in 0.568s\n\n\nYou can also set up a ``purelyjs.ini`` file:\n\n.. code::\n\n [purelyjs]\n\n # will be tried in order, first to succeed will be used\n interpreters = \n js\n rhino\n\n libs = \n static/js/code.js\n\n tests = \n static/js/test/tests.js\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/numerodix/purelyjs", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "purelyjs", "package_url": "https://pypi.org/project/purelyjs/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/purelyjs/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/numerodix/purelyjs" }, "release_url": "https://pypi.org/project/purelyjs/0.1.4/", "requires_dist": null, "requires_python": null, "summary": "A super simple testing framework for javascript", "version": "0.1.4" }, "last_serial": 1275526, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "732327421374f0597670150f123445c9", "sha256": "4876d3697a643ebb3c050d51b4adeeb71ebc38ba688759947f39c01c4c0c63cd" }, "downloads": -1, "filename": "purelyjs-0.1.tar.gz", "has_sig": false, "md5_digest": "732327421374f0597670150f123445c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6088, "upload_time": "2013-12-14T09:18:34", "url": "https://files.pythonhosted.org/packages/fe/34/f3de6af24a0f0f0f5c4aed37fd6a4d2f008439c802dd1bda6aa48a7cde82/purelyjs-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "83b9e74d331e58bd78b66c1905841450", "sha256": "fa4257563d7034e6c9bc73eb950fb4f73d30f3077b9cf7f527fe8bc178fe940f" }, "downloads": -1, "filename": "purelyjs-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "83b9e74d331e58bd78b66c1905841450", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8037, "upload_time": "2014-03-12T21:28:49", "url": "https://files.pythonhosted.org/packages/87/65/55feafb58e38d1c94ddc12d1b2170aff066c67ab325708051cd0a497bc02/purelyjs-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "56bf6fdc893935bda1144a6998ec5f27", "sha256": "90db70a4a635b3d316ff2fc53dcf0e09107eac290c84a59612021c1bcfb79940" }, "downloads": -1, "filename": "purelyjs-0.1.1.tar.gz", "has_sig": false, "md5_digest": "56bf6fdc893935bda1144a6998ec5f27", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6440, "upload_time": "2014-03-12T21:28:47", "url": "https://files.pythonhosted.org/packages/4a/e3/db9ed6472e527c916519f6dc1919f95c6738934d4764a10e020dd263d723/purelyjs-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "9601ff9538b8a06b03c6c2513581cea6", "sha256": "70a45d7c48e9e893e07d9700c300a72d60d19cdd51dea82faeaa0fdb0b8c49d1" }, "downloads": -1, "filename": "purelyjs-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9601ff9538b8a06b03c6c2513581cea6", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8020, "upload_time": "2014-03-15T12:25:30", "url": "https://files.pythonhosted.org/packages/24/4b/ca780edaa51215becd11f6fc84fa87fc706e27e3783f3508783ae310ec33/purelyjs-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "121fd14c75097a1ca892e8e14ce3e592", "sha256": "dcc50526a7168a33ab83f7fbd369fac93e419bec3d96fb02a396f1625d34326f" }, "downloads": -1, "filename": "purelyjs-0.1.2.tar.gz", "has_sig": false, "md5_digest": "121fd14c75097a1ca892e8e14ce3e592", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6432, "upload_time": "2014-03-15T12:25:28", "url": "https://files.pythonhosted.org/packages/74/e6/e2913416464453eac905c31ffe91f32a90ec268d234f5528960b6378cc9f/purelyjs-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "1250ecd17f001775c404d50d176493bf", "sha256": "b4fcdaa60d5db90ef650f87d7ff06e4fe60c76ab89ac6411b2d953c316afc6e0" }, "downloads": -1, "filename": "purelyjs-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1250ecd17f001775c404d50d176493bf", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8366, "upload_time": "2014-05-22T18:55:09", "url": "https://files.pythonhosted.org/packages/39/e3/13a5e36ce069e5d51fb4d8389156b3718adfecb0edc6da3edbe3e79721ff/purelyjs-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "671df1e4b190be45b06a66da615b9cc0", "sha256": "565d97c1c6fad2978f4eee25566a2d09695ef63b00b54ce621158a458dc866a0" }, "downloads": -1, "filename": "purelyjs-0.1.3.tar.gz", "has_sig": false, "md5_digest": "671df1e4b190be45b06a66da615b9cc0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6716, "upload_time": "2014-05-22T18:55:06", "url": "https://files.pythonhosted.org/packages/6f/cf/d28ea7f857373359b4955e6aa4086d0c7fe96691ff695ef35ad0c2ee5e97/purelyjs-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "built for Linux-3.13.0-36-generic-i686-with-glibc2.7", "digests": { "md5": "34df5a2ebec01526cf0253a387f1f012", "sha256": "fb2eacf17a9c821c7d825ee710f123c9373de2c507458c15b790988f3436cc12" }, "downloads": -1, "filename": "purelyjs-0.1.4.linux-i686.tar.gz", "has_sig": false, "md5_digest": "34df5a2ebec01526cf0253a387f1f012", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 10269, "upload_time": "2014-10-19T09:44:44", "url": "https://files.pythonhosted.org/packages/b4/bf/d63712b100bdfb26753290ea9c0119a6386d219e519ea060f22068065c2d/purelyjs-0.1.4.linux-i686.tar.gz" }, { "comment_text": "", "digests": { "md5": "5631a234ec7c71f219edf51986d5ad1a", "sha256": "2f36832c9f5991feecd38a97d02c39b676bcc28027f916a03a5ed1bed3ebffa1" }, "downloads": -1, "filename": "purelyjs-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5631a234ec7c71f219edf51986d5ad1a", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8423, "upload_time": "2014-10-19T09:47:27", "url": "https://files.pythonhosted.org/packages/00/cf/0ec3a82e17c3dd68b75f5f23808bef801e2498923a43c26a0646a9e62328/purelyjs-0.1.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1de1d66f24075b53923e2a4d38692787", "sha256": "4df65964218a91365c8b141c6954a6ff695f6661b5b151d7b62db525dcf5eba8" }, "downloads": -1, "filename": "purelyjs-0.1.4.tar.gz", "has_sig": false, "md5_digest": "1de1d66f24075b53923e2a4d38692787", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6766, "upload_time": "2014-10-19T09:42:08", "url": "https://files.pythonhosted.org/packages/fe/50/a8fd02aa3cff531d9c80fab94cee67cd14e79186727e6bfef82e6a32a100/purelyjs-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "built for Linux-3.13.0-36-generic-i686-with-glibc2.7", "digests": { "md5": "34df5a2ebec01526cf0253a387f1f012", "sha256": "fb2eacf17a9c821c7d825ee710f123c9373de2c507458c15b790988f3436cc12" }, "downloads": -1, "filename": "purelyjs-0.1.4.linux-i686.tar.gz", "has_sig": false, "md5_digest": "34df5a2ebec01526cf0253a387f1f012", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 10269, "upload_time": "2014-10-19T09:44:44", "url": "https://files.pythonhosted.org/packages/b4/bf/d63712b100bdfb26753290ea9c0119a6386d219e519ea060f22068065c2d/purelyjs-0.1.4.linux-i686.tar.gz" }, { "comment_text": "", "digests": { "md5": "5631a234ec7c71f219edf51986d5ad1a", "sha256": "2f36832c9f5991feecd38a97d02c39b676bcc28027f916a03a5ed1bed3ebffa1" }, "downloads": -1, "filename": "purelyjs-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5631a234ec7c71f219edf51986d5ad1a", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8423, "upload_time": "2014-10-19T09:47:27", "url": "https://files.pythonhosted.org/packages/00/cf/0ec3a82e17c3dd68b75f5f23808bef801e2498923a43c26a0646a9e62328/purelyjs-0.1.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1de1d66f24075b53923e2a4d38692787", "sha256": "4df65964218a91365c8b141c6954a6ff695f6661b5b151d7b62db525dcf5eba8" }, "downloads": -1, "filename": "purelyjs-0.1.4.tar.gz", "has_sig": false, "md5_digest": "1de1d66f24075b53923e2a4d38692787", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6766, "upload_time": "2014-10-19T09:42:08", "url": "https://files.pythonhosted.org/packages/fe/50/a8fd02aa3cff531d9c80fab94cee67cd14e79186727e6bfef82e6a32a100/purelyjs-0.1.4.tar.gz" } ] }