{"_id":"testla","_rev":"3645068","name":"testla","description":"An opinionated and lightweight testing framework","dist-tags":{"latest":"0.1.3"},"maintainers":[{"name":"goatslacker","email":""}],"time":{"modified":"2024-11-19T02:51:30.000Z","created":"2013-07-05T22:08:52.739Z","0.1.3":"2015-02-09T10:20:44.521Z","0.1.2":"2015-02-07T02:52:32.876Z","0.1.1":"2014-11-04T07:52:37.840Z","0.1.0":"2013-11-11T18:39:02.687Z","0.0.9":"2013-11-11T18:05:55.806Z","0.0.8":"2013-08-06T21:55:01.500Z","0.0.7":"2013-08-02T03:24:59.595Z","0.0.6":"2013-07-22T08:15:43.630Z","0.0.4":"2013-07-20T20:42:36.300Z","0.0.3":"2013-07-11T07:05:26.940Z","0.0.2":"2013-07-05T22:08:52.739Z"},"users":{},"author":{"name":"Josh Perez","email":"josh@goatslacker.com"},"repository":{"type":"git","url":"https://github.com/goatslacker/testla.git"},"versions":{"0.1.3":{"name":"testla","author":{"name":"Josh Perez","email":"josh@goatslacker.com"},"version":"0.1.3","description":"An opinionated and lightweight testing framework","license":"MIT","repository":{"type":"git","url":"https://github.com/goatslacker/testla.git"},"bugs":{"url":"https://github.com/goatslacker/testla/issues"},"main":"lib/index.js","bin":{"testla":"./bin/testla"},"dependencies":{"alt":"^0.12.0","dependency-injector":"~0.0.5","fantasy-promises":"^0.1.0"},"bundleDependencies":["asserts.js","fn.js","observer.js"],"engines":{"node":">= 0.4.0"},"gitHead":"717542bfe6a07deab28ffb2da23c989332ae37d6","homepage":"https://github.com/goatslacker/testla","_id":"testla@0.1.3","scripts":{},"_shasum":"c8cf232429a71d0584ab0b5b1760627dd27bc92d","_from":".","_npmVersion":"2.4.1","_nodeVersion":"1.1.0","_npmUser":{"name":"goatslacker","email":"josh@goatslacker.com"},"maintainers":[{"name":"goatslacker","email":""}],"dist":{"shasum":"c8cf232429a71d0584ab0b5b1760627dd27bc92d","size":8390,"noattachment":false,"key":"/testla/-/testla-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/testla/download/testla-0.1.3.tgz"},"directories":{},"publish_time":1423477244521,"_hasShrinkwrap":false,"_cnpm_publish_time":1423477244521,"_cnpmcore_publish_time":"2021-12-18T18:58:14.374Z"},"0.1.2":{"name":"testla","author":{"name":"Josh Perez","email":"josh@goatslacker.com"},"version":"0.1.2","description":"An opinionated and lightweight testing framework","license":"MIT","repository":{"type":"git","url":"https://github.com/goatslacker/testla.git"},"bugs":{"url":"https://github.com/goatslacker/testla/issues"},"main":"lib/index.js","bin":{"testla":"./bin/testla"},"dependencies":{"alt":"^0.12.0","dependency-injector":"~0.0.5","fantasy-promises":"^0.1.0"},"bundleDependencies":["asserts.js","fn.js","observer.js"],"engines":{"node":">= 0.4.0"},"gitHead":"37eb9859f53efc68d325ed9713ddddaf87210109","homepage":"https://github.com/goatslacker/testla","_id":"testla@0.1.2","scripts":{},"_shasum":"2bd399cb65bf2d23783d6c4a340daa7d8ba9ce16","_from":".","_npmVersion":"2.4.1","_nodeVersion":"1.1.0","_npmUser":{"name":"goatslacker","email":"josh@goatslacker.com"},"maintainers":[{"name":"goatslacker","email":""}],"dist":{"shasum":"2bd399cb65bf2d23783d6c4a340daa7d8ba9ce16","size":8394,"noattachment":false,"key":"/testla/-/testla-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/testla/download/testla-0.1.2.tgz"},"directories":{},"publish_time":1423277552876,"_hasShrinkwrap":false,"_cnpm_publish_time":1423277552876,"_cnpmcore_publish_time":"2021-12-18T18:58:14.591Z"},"0.1.1":{"name":"testla","author":{"name":"Josh Perez","email":"josh@goatslacker.com"},"version":"0.1.1","description":"An opinionated and lightweight testing framework","license":"MIT","repository":{"type":"git","url":"https://github.com/goatslacker/testla.git"},"bugs":{"url":"https://github.com/goatslacker/testla/issues"},"main":"lib/index.js","bin":{"testla":"./bin/testla"},"dependencies":{"dependency-injector":"~0.0.5","fantasy-promises":"^0.1.0"},"bundleDependencies":["asserts.js","fn.js","observer.js"],"engines":{"node":">= 0.4.0"},"gitHead":"c968b30aabf62cc771d6e5364491211f74305a8b","homepage":"https://github.com/goatslacker/testla","_id":"testla@0.1.1","scripts":{},"_shasum":"5cadf8dda85cea2be0a344a4821b5f65dbd00f41","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"goatslacker","email":"josh@goatslacker.com"},"maintainers":[{"name":"goatslacker","email":""}],"dist":{"shasum":"5cadf8dda85cea2be0a344a4821b5f65dbd00f41","size":8072,"noattachment":false,"key":"/testla/-/testla-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/testla/download/testla-0.1.1.tgz"},"directories":{},"publish_time":1415087557840,"_hasShrinkwrap":false,"_cnpm_publish_time":1415087557840,"_cnpmcore_publish_time":"2021-12-18T18:58:14.833Z"},"0.1.0":{"name":"testla","author":{"name":"Josh Perez","email":"josh@goatslacker.com"},"version":"0.1.0","description":"An opinionated and lightweight testing framework","license":"MIT","repository":{"type":"git","url":"https://github.com/goatslacker/testla.git"},"bugs":{"url":"https://github.com/goatslacker/testla/issues"},"main":"lib/index.js","bin":{"testla":"./bin/testla"},"dependencies":{"dependency-injector":"~0.0.5","fantasy-promises":"~0.1.0"},"bundleDependencies":["asserts.js","fn.js","observer.js"],"engines":{"node":">= 0.4.0"},"readmeFilename":"README.md","_id":"testla@0.1.0","dist":{"shasum":"6f127e7385cc11ae6719b47803fe0a1b4e497e6e","size":9233,"noattachment":false,"key":"/testla/-/testla-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/testla/download/testla-0.1.0.tgz"},"_from":".","_npmVersion":"1.2.25","_npmUser":{"name":"goatslacker","email":"josh@goatslacker.com"},"maintainers":[{"name":"goatslacker","email":""}],"directories":{},"publish_time":1384195142687,"_hasShrinkwrap":false,"_cnpm_publish_time":1384195142687,"_cnpmcore_publish_time":"2021-12-18T18:58:15.067Z"},"0.0.9":{"name":"testla","author":{"name":"Josh Perez","email":"josh@goatslacker.com"},"version":"0.0.9","description":"An opinionated and lightweight testing framework","license":"MIT","repository":{"type":"git","url":"https://github.com/goatslacker/testla.git"},"bugs":{"url":"https://github.com/goatslacker/testla/issues"},"main":"lib/index.js","bin":{"testla":"./bin/testla"},"dependencies":{"dependency-injector":"~0.0.5","fantasy-promises":"~0.1.0"},"bundleDependencies":["asserts.js","fn.js","observer.js"],"engines":{"node":">= 0.4.0"},"readmeFilename":"README.md","_id":"testla@0.0.9","dist":{"shasum":"7ff8755e822942ba68cdf4ac3b2bc5fd8fca413f","size":9240,"noattachment":false,"key":"/testla/-/testla-0.0.9.tgz","tarball":"http://registry.cnpm.dingdandao.com/testla/download/testla-0.0.9.tgz"},"_from":".","_npmVersion":"1.2.25","_npmUser":{"name":"goatslacker","email":"josh@goatslacker.com"},"maintainers":[{"name":"goatslacker","email":""}],"directories":{},"publish_time":1384193155806,"_hasShrinkwrap":false,"_cnpm_publish_time":1384193155806,"_cnpmcore_publish_time":"2021-12-18T18:58:15.458Z"},"0.0.8":{"name":"testla","author":{"name":"Josh Perez","email":"josh@goatslacker.com"},"version":"0.0.8","description":"An opinionated and lightweight testing framework","repository":{"type":"git","url":"https://github.com/goatslacker/testla.git"},"main":"lib/index.js","bin":{"testla":"./bin/testla"},"dependencies":{"dependency-injector":"*","fantasy-promises":"*"},"engines":{"node":">= 0.4.0"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/goatslacker/testla/issues"},"bundleDependencies":["fn.js","asserts.js","observer.js"],"_id":"testla@0.0.8","dist":{"shasum":"12f88d552119d3dfd5edd8271e9704c84688a8b4","size":8367,"noattachment":false,"key":"/testla/-/testla-0.0.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/testla/download/testla-0.0.8.tgz"},"_from":".","_npmVersion":"1.2.25","_npmUser":{"name":"goatslacker","email":"josh@goatslacker.com"},"maintainers":[{"name":"goatslacker","email":""}],"directories":{},"publish_time":1375826101500,"_hasShrinkwrap":false,"_cnpm_publish_time":1375826101500,"_cnpmcore_publish_time":"2021-12-18T18:58:15.683Z"},"0.0.7":{"name":"testla","author":{"name":"Josh Perez","email":"josh@goatslacker.com"},"version":"0.0.7","description":"An opinionated and lightweight testing framework","repository":{"type":"git","url":"https://github.com/goatslacker/testla.git"},"main":"lib/index.js","dependencies":{"dependency-injector":"*","fantasy-promises":"*"},"engines":{"node":">= 0.4.0"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/goatslacker/testla/issues"},"bundleDependencies":["fn.js","asserts.js","observer.js"],"_id":"testla@0.0.7","dist":{"shasum":"e87d25a9e6e8dafa8033a9a6df01dbf1de7b04dd","size":8251,"noattachment":false,"key":"/testla/-/testla-0.0.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/testla/download/testla-0.0.7.tgz"},"_from":".","_npmVersion":"1.2.25","_npmUser":{"name":"goatslacker","email":"josh@goatslacker.com"},"maintainers":[{"name":"goatslacker","email":""}],"directories":{},"publish_time":1375413899595,"_hasShrinkwrap":false,"_cnpm_publish_time":1375413899595,"_cnpmcore_publish_time":"2021-12-18T18:58:15.892Z"},"0.0.6":{"name":"testla","author":{"name":"Josh Perez","email":"josh@goatslacker.com"},"version":"0.0.6","description":"An opinionated and lightweight testing framework","repository":{"type":"git","url":"https://github.com/goatslacker/testla.git"},"main":"lib/index.js","dependencies":{"dependency-injector":"*","fantasy-promises":"*"},"engines":{"node":">= 0.4.0"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/goatslacker/testla/issues"},"bundleDependencies":["fn.js","asserts.js","observer.js"],"_id":"testla@0.0.6","dist":{"shasum":"4b900234ccf717f9a46240787f3035303fbec256","size":8245,"noattachment":false,"key":"/testla/-/testla-0.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/testla/download/testla-0.0.6.tgz"},"_from":".","_npmVersion":"1.2.25","_npmUser":{"name":"goatslacker","email":"josh@goatslacker.com"},"maintainers":[{"name":"goatslacker","email":""}],"directories":{},"publish_time":1374480943630,"_hasShrinkwrap":false,"_cnpm_publish_time":1374480943630,"_cnpmcore_publish_time":"2021-12-18T18:58:16.124Z"},"0.0.4":{"name":"testla","author":{"name":"Josh Perez","email":"josh@goatslacker.com"},"version":"0.0.4","description":"An opinionated and lightweight testing framework","repository":{"type":"git","url":"https://github.com/goatslacker/testla.git"},"main":"lib/index.js","dependencies":{"dependency-injector":"*","fantasy-promises":"*"},"engines":{"node":">= 0.4.0"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/goatslacker/testla/issues"},"bundleDependencies":["fn.js","asserts.js","observer.js"],"_id":"testla@0.0.4","dist":{"shasum":"faac4e69a0e5b69827e0b646cd5e5e5f0343f0b3","size":8228,"noattachment":false,"key":"/testla/-/testla-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/testla/download/testla-0.0.4.tgz"},"_from":".","_npmVersion":"1.2.25","_npmUser":{"name":"goatslacker","email":"josh@goatslacker.com"},"maintainers":[{"name":"goatslacker","email":""}],"directories":{},"publish_time":1374352956300,"_hasShrinkwrap":false,"_cnpm_publish_time":1374352956300,"_cnpmcore_publish_time":"2021-12-18T18:58:16.320Z"},"0.0.3":{"name":"testla","author":{"name":"Josh Perez","email":"josh@goatslacker.com"},"version":"0.0.3","description":"An opinionated and lightweight testing framework","repository":{"type":"git","url":"https://github.com/goatslacker/testla.git"},"main":"lib/index.js","dependencies":{"dependency-injector":"*","fantasy-promises":"*"},"engines":{"node":">= 0.4.0"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/goatslacker/testla/issues"},"bundleDependencies":["fn.js","asserts.js","observer.js"],"_id":"testla@0.0.3","dist":{"shasum":"a17fc82fc8198ba26d55bdafa6b0b603080ecde0","size":8208,"noattachment":false,"key":"/testla/-/testla-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/testla/download/testla-0.0.3.tgz"},"_from":".","_npmVersion":"1.2.25","_npmUser":{"name":"goatslacker","email":"josh@goatslacker.com"},"maintainers":[{"name":"goatslacker","email":""}],"directories":{},"publish_time":1373526326940,"_hasShrinkwrap":false,"_cnpm_publish_time":1373526326940,"_cnpmcore_publish_time":"2021-12-18T18:58:16.516Z"},"0.0.2":{"name":"testla","author":{"name":"Josh Perez","email":"josh@goatslacker.com"},"version":"0.0.2","description":"An opinionated and lightweight testing framework","repository":{"type":"git","url":"https://github.com/goatslacker/testla.git"},"main":"lib/index.js","dependencies":{"dependency-injector":"*","fantasy-promises":"*"},"engines":{"node":">= 0.4.0"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/goatslacker/testla/issues"},"bundleDependencies":["fn.js","asserts.js","observer.js"],"_id":"testla@0.0.2","dist":{"shasum":"056144e520a25da63cfb5ad3fd81a96468c8fc23","size":8222,"noattachment":false,"key":"/testla/-/testla-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/testla/download/testla-0.0.2.tgz"},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"goatslacker","email":"josh@goatslacker.com"},"maintainers":[{"name":"goatslacker","email":""}],"directories":{},"publish_time":1373062132739,"_hasShrinkwrap":false,"_cnpm_publish_time":1373062132739,"_cnpmcore_publish_time":"2021-12-18T18:58:16.723Z"}},"readme":"[![NPM version](https://badge.fury.io/js/testla.png)](http://badge.fury.io/js/testla)\n[![Dependency Status](https://david-dm.org/goatslacker/testla.png)](https://david-dm.org/goatslacker/testla)\n\n# testla\n\n> an opinionated and lightweight testing framework for the browser and node.js\n\n## install\n\n```\nnpm install -g testla\n```\n\n\n## reference\n\n```\ntestla [FILE, ...]\n```\n\nRunning individual tests\n\n```\ntestla file1-test.js file2-test.js\n```\n\nRunning all tests in folder\n\n```\ntestla tests/\n```\n\n\n### ideas\n\n* Modules\n* Dependency Injection\n* Browser, framework, and platform independent\n* Intuitive and lightweight syntax\n\n\n### matchers\n\nSimilar to node.js `assert`\n\n```\nfail\nok\nequal\nnotEqual\nstrictEqual\nnotStrictEqual\ndeepEqual\nnotDeepEqual\nthrows\ndoesNotThrow\n```\n\nOther included matchers\n\n```\nisFunction\nisNumber\nisString\nisBoolean\nisArray\nisObject\nisArguments\nisDate\nisRegExp\nisUndefined\nisNull\nisNaN\nisTrue\nisFalse\nisEmpty\n```\n\n\n### custom matchers\n\nIn your `dependencies.js` file export a function which returns an object\nliteral of dependencies. Here you can use `assert.extend()` to create your own\ncustom matchers.\n\n```js\nmodule.exports = function (assert) {\n  assert.extend({\n    myCustomMatcher: function (a, b, message) {\n      assert.equal(a, b, message)\n    }\n  })\n\n  return {\n    myDep: 1,\n    otherDependency: 'hello'\n  }\n}\n```\n\n\n### spies\n\nSpies are useful for hooking into functions and asserting that they have been\ncalled and with the correct parameters.\n\nTo work with spies just include `spy` in your test function's parameters.\n\n```js\nvar obj = { foo: function () { } }\n\n'a spy test': function (spy) {\n  var mySpy = spy.on(obj, 'foo')\n  obj.foo('bar')\n  mySpy.assert('bar')\n}\n```\n\n\n### asynchronous\n\nRelies on promises to provide asynchronous tests. One can `reject` or fail the\ntest or `resolve`/complete the test. Returning the promise is essential to mark\nthe test as asynchronous and inform testla to wait for the test to finish.\n\n```js\n'an async test': function (promise) {\n  setTimeout(function () {\n    promise.resolve(4)\n  }, 500)\n\n  return promise\n}\n```\n\n# License\n\n[MIT LICENSE](http://josh.mit-license.org)\n","_attachments":{},"homepage":"https://github.com/goatslacker/testla","bugs":{"url":"https://github.com/goatslacker/testla/issues"},"license":"MIT"}