{"_id":"jasmine-promise-wrapper","_rev":"5-cf427c63bee260d2c15fa0d8b1397b64","name":"jasmine-promise-wrapper","description":"Promise handling for jasmine","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"jasmine-promise-wrapper","version":"0.0.1","description":"Promise handling for jasmine","main":"index.js","scripts":{"test":"tslint '*.ts' -e '*.d.ts' && jasmine-ts index.spec.ts","prepublish":"tsc"},"repository":{"type":"git","url":"git+https://github.com/svi3c/jasmine-promise.git"},"keywords":["jasmine","typescript","testing","promises","async"],"author":{"name":"Sven Reglitzki","email":"sreglitzki@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/svi3c/jasmine-promise/issues"},"homepage":"https://github.com/svi3c/jasmine-promise#readme","devDependencies":{"@types/jasmine":"^2.5.41","jasmine-ts":"0.0.3","tslint":"^4.4.2","typescript":"^2.1.5"},"engines":{"node":">= 6.0.0"},"gitHead":"2e9360924cdb04c22ca0473f53e4167b5ffef0a9","_id":"jasmine-promise-wrapper@0.0.1","_shasum":"3189949632fdaf570635d96b64437a9c30232b89","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"svi3c","email":"sreglitzki@gmail.com"},"dist":{"shasum":"3189949632fdaf570635d96b64437a9c30232b89","tarball":"https://registry.npmjs.org/jasmine-promise-wrapper/-/jasmine-promise-wrapper-0.0.1.tgz","integrity":"sha512-Q331I/pOY3vPO2oalyxVG31t0uTp7Fk2gc24l+tTyZ3f7HdvEaBgR6h31rJz8KO24PTe7vjLpVOEEX+hA0gKBA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkqV29sEcllDCirHv+GIXWjjTcOJIFRyYNcMVDTfL1EwIhAIKdRY0+6OM/4XR+TDUuWlXjm3HBR/g2hqRZPpa/Xw9t"}]},"maintainers":[{"name":"svi3c","email":"sreglitzki@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/jasmine-promise-wrapper-0.0.1.tgz_1486151462952_0.779138267505914"}},"0.0.2":{"name":"jasmine-promise-wrapper","version":"0.0.2","description":"Promise handling for jasmine","main":"index.js","scripts":{"test":"tslint '*.ts' -e '*.d.ts' && jasmine-ts index.spec.ts","prepublish":"tsc"},"repository":{"type":"git","url":"git+https://github.com/svi3c/jasmine-promise.git"},"keywords":["jasmine","typescript","testing","promises","async"],"author":{"name":"Sven Reglitzki","email":"sreglitzki@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/svi3c/jasmine-promise/issues"},"homepage":"https://github.com/svi3c/jasmine-promise#readme","devDependencies":{"@types/jasmine":"^2.5.41","jasmine-ts":"0.0.3","tslint":"^4.4.2","typescript":"^2.1.5"},"engines":{"node":">= 6.0.0"},"gitHead":"383ecb5f155e78e8f31a69d8c194b36ee18d2e94","_id":"jasmine-promise-wrapper@0.0.2","_shasum":"226a6d6dfa42ede9a39b3a1f0f7c5a6bc86b30c1","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"svi3c","email":"sreglitzki@gmail.com"},"dist":{"shasum":"226a6d6dfa42ede9a39b3a1f0f7c5a6bc86b30c1","tarball":"https://registry.npmjs.org/jasmine-promise-wrapper/-/jasmine-promise-wrapper-0.0.2.tgz","integrity":"sha512-hfbbMwm3emZFr+fcQii9o95du87TnsHlInmc7asD0/IPcL1P2QPcno2YJw0hdnzXEqtyBFu/H3g5ubw7gLQaDg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDypA5jubQdfQMNY0N14/WZxMX6/TsGo3OZqOvJNCjw8gIhAKheph4t3Xuvj+PJ2oXAoj1CSDCQK9O0V1OBrUpzzQ7Q"}]},"maintainers":[{"name":"svi3c","email":"sreglitzki@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/jasmine-promise-wrapper-0.0.2.tgz_1486152341324_0.6885509823914617"}},"0.0.3":{"name":"jasmine-promise-wrapper","version":"0.0.3","description":"Promise handling for jasmine","main":"index.js","scripts":{"test":"tslint '*.ts' -e '*.d.ts' && jasmine-ts index.spec.ts","prepublish":"tsc"},"repository":{"type":"git","url":"git+https://github.com/svi3c/jasmine-promise.git"},"keywords":["jasmine","typescript","testing","promises","async"],"author":{"name":"Sven Reglitzki","email":"sreglitzki@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/svi3c/jasmine-promise/issues"},"homepage":"https://github.com/svi3c/jasmine-promise#readme","devDependencies":{"@types/jasmine":"^2.5.41","jasmine-ts":"0.0.3","tslint":"^4.4.2","typescript":"^2.1.5"},"engines":{"node":">= 6.0.0"},"gitHead":"2c9af8dbf3553b2b846f9f60cc89297f82712f36","_id":"jasmine-promise-wrapper@0.0.3","_shasum":"22c438852f77a0f3e10f8d264d6a686f0fd36eff","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"svi3c","email":"sreglitzki@gmail.com"},"dist":{"shasum":"22c438852f77a0f3e10f8d264d6a686f0fd36eff","tarball":"https://registry.npmjs.org/jasmine-promise-wrapper/-/jasmine-promise-wrapper-0.0.3.tgz","integrity":"sha512-rL2V/rfGOVojOXkMqLjsBsPvkDg8QXG114t417wyC3ehAxzjjZia1W19Eo0iPLZA3lbxffKAwIHNH74/FfExQQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC1LmatEV9oyQMu0dZ3glFT8+i1IYqh8vtbyy4HQtYpLAiEAkmMw39yAARKodJMV0aCX+UBLwfoY3PqeSOnnraqvGEw="}]},"maintainers":[{"name":"svi3c","email":"sreglitzki@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jasmine-promise-wrapper-0.0.3.tgz_1496164210562_0.02227233676239848"}}},"readme":"# jasmine-promise-wrapper\n\n[![Build Status](https://travis-ci.org/svi3c/jasmine-promise.svg?branch=master)](https://travis-ci.org/svi3c/jasmine-promise)\n\n## Purpose of this library\n\nThis library shall simplify promise handling within jasmine.\nTo achieve this, it provides some wrapper functions which\ncan handle returned promises.\nThe specs will wait for the resolution or rejection of those\npromises.\n\n## API\n\nThe following wrapping functions are exported by this library:\n\n* `it(description, fn, timeout)`\n* `beforeEach(fn, timeout)`\n* `afterEach(fn, timeout)`\n* `beforeAll(fn, timeout)`\n* `afterAll(fn, timeout)`\n\nAdditionaly there is an `invert(promise)` function that takes promise\nand returns an inverted promise that is rejected with the original\nresolution or resolved with the original rejection.\nThis comes in handy when expecting promises to be rejected.\n\n## Simple example\n\n```ts\nimport {it} from \"jasmine-promise-wrapper\";\n\nconst unit = () =>\n  new Promise(resolve =>\n    setTimeout(() => resolve(\"success\"), 1000));\n\nit(\"should wait for a promise\", () => {\n  return unit()\n    .then(result => {\n      expect(result).toBe(\"success\");\n    });\n});\n\n// alternative with implicit returns:\n\nit(\"should wait for a promise\", () =>\n  unit()\n    .then(result =>\n      expect(result).toBe(\"success\")));\n\n// alternative with async/await:\n\nit(\"should wait for a promise\", async () => {\n  const result = await unit();\n  expect(result).toBe(\"success\");\n});\n```","maintainers":[{"name":"svi3c","email":"sreglitzki@gmail.com"}],"time":{"modified":"2022-06-19T03:47:36.016Z","created":"2017-02-03T19:51:03.616Z","0.0.1":"2017-02-03T19:51:03.616Z","0.0.2":"2017-02-03T20:05:43.313Z","0.0.3":"2017-05-30T17:10:11.547Z"},"homepage":"https://github.com/svi3c/jasmine-promise#readme","keywords":["jasmine","typescript","testing","promises","async"],"repository":{"type":"git","url":"git+https://github.com/svi3c/jasmine-promise.git"},"author":{"name":"Sven Reglitzki","email":"sreglitzki@gmail.com"},"bugs":{"url":"https://github.com/svi3c/jasmine-promise/issues"},"license":"MIT","readmeFilename":"README.md","users":{"ubenzer":true}}