{"_id":"@alterior/testing","_rev":"7-c435101ba690bf90bb8255d6e28b43bb","name":"@alterior/testing","description":"A testing framework to complement Alterior","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@alterior/testing","version":"0.0.1","description":"A testing framework to complement Alterior","main":"index.js","repository":{"url":"git+https://github.com/alterior-mvc/alterior-testing.git"},"scripts":{"test":"tsc && node ./node_modules/mocha/bin/mocha test/sample.js","dev-test":"nodemon -e ts --ignore \"*.d.ts\" --exec npm test ","build":"tsc","prepublish":"typings install && tsc"},"author":{"name":"William Lahti","email":"wilahti@gmail.com"},"license":"MIT","dependencies":{"@alterior/core":"0.0.7","body-parser":"^1.15.2","express":"^4.14.0","mocha":"^3.0.2","supertest":"^2.0.0"},"gitHead":"f02046cc3b723c541e7fc1405beed5d4de133602","bugs":{"url":"https://github.com/alterior-mvc/alterior-testing/issues"},"homepage":"https://github.com/alterior-mvc/alterior-testing#readme","_id":"@alterior/testing@0.0.1","_shasum":"455b19963cfa4c3b9becd65c4c0c3a4df205a7c9","_from":".","_npmVersion":"3.10.6","_nodeVersion":"6.5.0","_npmUser":{"name":"alterior","email":"wilahti@gmail.com"},"dist":{"shasum":"455b19963cfa4c3b9becd65c4c0c3a4df205a7c9","tarball":"https://registry.npmjs.org/@alterior/testing/-/testing-0.0.1.tgz","integrity":"sha512-hfWrD1287X7/UUqRlXFm27LKfcH+spIbmlAWmaibx/sjkK9ASlpxJgI545wgl9GBEqi7rDDf+2yKgp/3pbLp2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFemEY6EhHMk9y58au+YFZbIMFbtSrXyu0IwTIoBvIpBAiB742mYjebpQccfk3UPiL81J/hX84PiOYM/8ytDiGYf4g=="}]},"maintainers":[{"name":"alterior","email":"wilahti@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/testing-0.0.1.tgz_1474844176603_0.43230872717686"},"directories":{}},"0.0.2":{"name":"@alterior/testing","version":"0.0.2","description":"A testing framework to complement Alterior","main":"index.js","repository":{"url":"git+https://github.com/alterior-mvc/alterior-testing.git"},"typings":"./index.d.ts","scripts":{"test":"tsc && node ./node_modules/mocha/bin/mocha test/sample.js","dev-test":"nodemon -e ts --ignore \"*.d.ts\" --exec npm test ","build":"tsc","prepublish":"typings install && tsc"},"author":{"name":"William Lahti","email":"wilahti@gmail.com"},"license":"MIT","dependencies":{"@alterior/core":"0.0.7","body-parser":"^1.15.2","express":"^4.14.0","mocha":"^3.0.2","supertest":"^2.0.0"},"gitHead":"e84c08163a3f3f786ffbd32a7082f14d146520f0","bugs":{"url":"https://github.com/alterior-mvc/alterior-testing/issues"},"homepage":"https://github.com/alterior-mvc/alterior-testing#readme","_id":"@alterior/testing@0.0.2","_shasum":"5b5fb4179d64587a328b5d14be362da60efcba3f","_from":".","_npmVersion":"3.10.6","_nodeVersion":"6.5.0","_npmUser":{"name":"alterior","email":"wilahti@gmail.com"},"dist":{"shasum":"5b5fb4179d64587a328b5d14be362da60efcba3f","tarball":"https://registry.npmjs.org/@alterior/testing/-/testing-0.0.2.tgz","integrity":"sha512-Mp//wxrcph9TnCzR03vfk4bH9PXDhD0GspIfk2Dx1n9G4jbzZ8RxoKKq4L1H7DFqXrN/hLylZFqyYqweqbzNvA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUPvsCvbXkBK6cENlIIxuOUoMysxxV/KO4055fIXpZvQIgYFWymTTl0wa9lkW1fipn1Kjqt4u1EqhENUSMAWPpljM="}]},"maintainers":[{"name":"alterior","email":"wilahti@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/testing-0.0.2.tgz_1474849275884_0.5583575377240777"},"directories":{}}},"readme":"# Alterior Testing\r\n\r\nProvides a thin shim above [`mocha`](https://mochajs.org/) and [`supertest`](https://github.com/visionmedia/supertest) that simplifies testing apps using [`alterior`](https://github.com/alterior-mvc/alterior).\r\nTries to remain familiar to existing mocha users while reducing boilerplate and making testing more natural.   \r\n\r\n```typescript\r\nimport { teststrap, it } from 'teststrap';\r\nimport { App } from './app.ts';\r\n\r\nteststrap(App);\r\n\r\ndescribe(\"/people\", () => {\r\n\tit(\"should produce a list of people\", \r\n\t\tapp => app.get('/people')\r\n\t\t\t.expect(200, <any>[])\r\n\t);\r\n\r\n\tit(\"should allow you to add a person\", \r\n\t\tapp => app.put('/people')\r\n\t\t\t.send({id: 123, name: 'Santa'})\r\n\t\t\t.expect(201)\r\n\t);\r\n\r\n\tit(\"should show you a person after they have been added\", \r\n\t\tapp => Promise.resolve()\r\n\t\t\t.then(() => app.put('/people').send({id: 123, name: 'Santa'})\r\n\t\t\t\t.expect(201, <any>[])\r\n\t\t\t)\r\n\t\t\t.then(() => app.get('/people')\r\n\t\t\t\t.expect(200, <any>[{ id: 123, name: 'Santa' }])\r\n\t\t\t)\r\n\t);\r\n});\r\n```","maintainers":[{"email":"wilahti@gmail.com","name":"rezonant"}],"time":{"modified":"2022-06-12T14:35:55.479Z","created":"2016-09-25T22:56:18.511Z","0.0.1":"2016-09-25T22:56:18.511Z","0.0.2":"2016-09-26T00:21:17.708Z"},"homepage":"https://github.com/alterior-mvc/alterior-testing#readme","repository":{"url":"git+https://github.com/alterior-mvc/alterior-testing.git"},"author":{"name":"William Lahti","email":"wilahti@gmail.com"},"bugs":{"url":"https://github.com/alterior-mvc/alterior-testing/issues"},"license":"MIT","readmeFilename":"README.md"}