{"_id":"@boneskull/unexpected-rxjs","_rev":"1-42126dce1e510dd17ef5dbb33e46f057","name":"@boneskull/unexpected-rxjs","dist-tags":{"latest":"0.3.0"},"versions":{"0.3.0":{"name":"@boneskull/unexpected-rxjs","version":"0.3.0","description":"RxJS Assertions for Unexpected","keywords":["assert","assertions","expect","observable","rxjs","unexpected","unexpected-plugin"],"repository":{"type":"git","url":"git+https://github.com/boneskull/unexpected-rxjs.git"},"license":"Apache-2.0","author":{"name":"Christopher Hiller","email":"boneskull@boneskull.com","url":"https://boneskull.com/"},"main":"dist/unexpected-rxjs.cjs.js","module":"dist/unexpected-rxjs.esm.js","browser":"dist/unexpected-rxjs.umd.js","scripts":{"build":"rollup -c","clean":"git clean -fdx dist","dev":"rollup -c -w","prepublishOnly":"npm run clean && npm run build","release":"standard-version","pretest":"npm run build","test":"nyc mocha \"test/**/*.spec.js\"","format":"eslint . --fix && markdownlint-cli2-fix \"*.md\"","posttest":"markdownlint-cli2 README.md && eslint .","prepare":"husky install","lint-staged":"lint-staged"},"lint-staged":{"*.js":["eslint --fix"],"*.{yml,md}":["prettier --write"],"*.md":["markdownlint-cli2-fix"]},"babel":{"presets":[["@babel/preset-env",{"targets":{"browsers":"> 3%","node":"12.0.0"},"modules":false}]]},"prettier":{"bracketSpacing":false,"endOfLine":"auto","singleQuote":true},"devDependencies":{"@babel/core":"^7.5.4","@babel/preset-env":"^7.5.4","eslint":"^7.28.0","eslint-config-prettier":"^8.3.0","eslint-config-semistandard":"^15.0.1","eslint-config-standard":"^14.1.1","eslint-plugin-import":"^2.18.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^3.1.0","eslint-plugin-promise":"^5.1.0","husky":"^6.0.0","lint-staged":"^11.0.0","markdownlint-cli2":"^0.1.3","mocha":"^9.0.0","nyc":"^15.1.0","prettier":"^2.3.1","proxyquire":"^2.1.1","rollup":"^2.51.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rxjs":"7.1.0","sinon":"^11.1.1","standard-version":"^9.3.0","unexpected":"12.0.3","unexpected-sinon":"^11.0.1"},"peerDependencies":{"rxjs":"^6.0.0 || ^7.0.0","unexpected":"*"},"engines":{"node":">=12"},"publishConfig":{"access":"public"},"standard-version":{"scripts":{"postchangelog":"prettier --write CHANGELOG.md && markdownlint-cli2-fix CHANGELOG.md"}},"gitHead":"6deed48d8cbb2f7a114048698a3a6139511d0165","bugs":{"url":"https://github.com/boneskull/unexpected-rxjs/issues"},"homepage":"https://github.com/boneskull/unexpected-rxjs#readme","_id":"@boneskull/unexpected-rxjs@0.3.0","_nodeVersion":"16.0.0","_npmVersion":"7.10.0","dist":{"integrity":"sha512-omS5UDc8+FhMxgEnsuu6odF3lv3O0o5vv0vZIAH1SwRvxURncm1lyreGNGGGAinQkDlf/PRTMutn4BcWtUDWKw==","shasum":"a17e85cb97a5f8125ebace8dd6b783a4c9305339","tarball":"https://registry.npmjs.org/@boneskull/unexpected-rxjs/-/unexpected-rxjs-0.3.0.tgz","fileCount":7,"unpackedSize":67680,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvp09CRA9TVsSAnZWagAAS0cP/1JRhMWKwb72HTAqiZLo\ncxH92QE8CVx4IffrWVmuOYCeB80v61GLqkpp/pY8HOIdCB9wCURiXYAa8u1B\nGf802JERgffSvbvTLK7NFFETYXVrYtCjgP4w2W/ULJzVnKROAPJBp/lvZZQw\n6jF2Hx/meDnDoBi5v5/Bl847Z+GQZ/ZbpRgtui0aCMb9bAvsLtJczU4noJ6k\nGi5PYDXOP+u9FguJeHz5cjCeFY2tLm6m8Mkcpv1E7QCptk2giDaSOQanKTmg\nkcA/kFf6DY7KO/bDcZDLBfeo3RiBm1FxSkrw/+EgIIt9OM9hYSmC+tdHlE63\ngFHbTWNEQRJjl52QiD5bANuQDc56ujgrdQLnBBKla/C+GY9h+FLiqiMj39Jq\nRR+yjNvPmJhsUASJMBsUZzDdI8J77dD/TIMSWx2f0d2u67HvVPt9SZYtISdf\nthsXUi0yLt/pX1PKKcEnbAOzf0Ts/R4MQbfz4pZTySOvPeyORWXIUhlPZkUt\nBjRln427NMAorzamb81k8jUa3QNlWUvs791+iPB9gl+BzjlhEE89JsNO0ref\n0+jNoVMASEL5Dnk3mrITueOIXkX/R0xxRJtfhgqc+icSW5piKBccqC6cefjj\nCsnsiOrJtwQ1NtxI860eFQlNHQU6AVwpET9l4LoX+flTUkyGzg71t6DEJ8Yo\nHvZR\r\n=BSAE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1EeAyz2LgA0qXGON9cdhr+rqhL0CISDFo0JnpfHyqigIgZkhWmlW39UX9uLT2tsN9SzJtIyDBshBc5OwgmYym5cw="}]},"_npmUser":{"name":"boneskull","email":"boneskull@boneskull.com"},"directories":{},"maintainers":[{"name":"boneskull","email":"boneskull@boneskull.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unexpected-rxjs_0.3.0_1623104829811_0.8872138672974559"},"_hasShrinkwrap":false}},"time":{"created":"2021-06-07T22:27:09.768Z","0.3.0":"2021-06-07T22:27:09.948Z","modified":"2022-04-04T20:06:08.277Z"},"maintainers":[{"name":"boneskull","email":"boneskull@boneskull.com"}],"description":"RxJS Assertions for Unexpected","homepage":"https://github.com/boneskull/unexpected-rxjs#readme","keywords":["assert","assertions","expect","observable","rxjs","unexpected","unexpected-plugin"],"repository":{"type":"git","url":"git+https://github.com/boneskull/unexpected-rxjs.git"},"author":{"name":"Christopher Hiller","email":"boneskull@boneskull.com","url":"https://boneskull.com/"},"bugs":{"url":"https://github.com/boneskull/unexpected-rxjs/issues"},"license":"Apache-2.0","readme":"# unexpected-rxjs\n\n> Assertions for use with [RxJS](https://rjxs.dev) and [Unexpected](http://unexpected.js.org)\n\nThis module is a plugin for the Unexpected assertion library which provides handy assertions against RxJS `Observable`s.\n\n## Install\n\nBoth `rxjs` and `unexpected` are peer dependencies of this module.\n\n```shell\n$ npm install rxjs@^6 # peer dependency\n$ npm install unexpected unexpected-rxjs --save-dev\n```\n\n## Usage\n\nUse as an Unexpected plugin in Node.js:\n\n```js\nconst unexpected = require('unexpected');\nconst expect = unexpected.clone().use(require('unexpected-rxjs'));\n```\n\nOr using ES modules:\n\n```js\nimport unexpected from 'unexpected';\nimport unexpectedRxjs from 'unexpected-rxjs';\nconst expect = unexpected.clone().use(unexpectedRxjs);\n```\n\nBrowser, using globals:\n\n```js\nconst unexpected = window.weknowhow.expect;\nconst expect = unexpected.clone().use(window.unexpectedRxjs);\n```\n\nThen:\n\n```js\nimport {of} from 'rxjs';\n\ndescribe('contrived example', function() {\n  it('should emit \"foo\"', function() {\n    return expect(of('foo', 'bar'), 'to emit values', 'foo', 'bar');\n  });\n});\n```\n\n## Assertions\n\n_Note_: All assertions return `Promise` values, so you will want to `return expect(/*...*/)` (using Mocha) or otherwise use `async` functions.\n\n- `<Observable> to complete` - Asserts an `Observable` completes. Given the halting problem, this can _only_ fail if the `Observable` emits an error _or_ your test framework times out.\n- `<Observable> [not] to emit (value|values) <any+>` - Asserts an `Observable` emits one or more values using object equivalence.\n- `<Observable> [not] to emit times <count>` - Asserts an `Observable` emits _count_ times.\n- `<Observable> [not] to emit (once|twice|thrice)` - Sugar for previous assertion.\n- `<Observable> [not] to emit error <any?>` - Asserts an `Observable` emits an \"error\"; uses Unexpected's default error matching.\n- `<Observable> to emit error [exhaustively] satisfying <any>` - Asserts an `Observable` emits an \"error\" using \"to satisfy\" semantics.\n- `<Observable> [not] to complete with value <any+>` - Assert when an `Observable` completes, it has emitted one or more matching values.\n- `<Observable> [not] to complete with value [exhaustively] satisfying <any+>` - Same as previous, except using \"to satisfy\" semantics.\n- `<Observable> when complete <assertion>` - Akin to Unexpected's `<Promise> when fulfilled <assertion>` syntax.\n\n## Development\n\nExecute `npm run build` to bundle the project for distribution.\n\n## Notes\n\n- `<Observable> [not] to complete with value [exhaustively] satisfying <any+>` has some significant performance issues.\n\n## License\n\nCopyright © 2019 IBM. Licensed Apache-2.0\n","readmeFilename":"README.md"}