{"id":15598187,"url":"https://github.com/boneskull/unexpected-rxjs","last_synced_at":"2025-08-17T05:31:32.556Z","repository":{"id":66095617,"uuid":"191982421","full_name":"boneskull/unexpected-rxjs","owner":"boneskull","description":"MOVED to https://github.com/IBM/unexpected-rxjs","archived":true,"fork":false,"pushed_at":"2021-06-07T22:26:50.000Z","size":300,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-08T14:13:25.173Z","etag":null,"topics":["assert","assertion-library","assertions","expect","observable","rxjs","test","unexpected"],"latest_commit_sha":null,"homepage":"https://github.com/IBM/unexpected-rxjs","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boneskull.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-14T17:31:14.000Z","updated_at":"2024-11-19T20:01:48.000Z","dependencies_parsed_at":"2023-03-13T03:16:28.572Z","dependency_job_id":null,"html_url":"https://github.com/boneskull/unexpected-rxjs","commit_stats":{"total_commits":28,"total_committers":2,"mean_commits":14.0,"dds":0.1071428571428571,"last_synced_commit":"6deed48d8cbb2f7a114048698a3a6139511d0165"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":"boneskull/boneskull-template","purl":"pkg:github/boneskull/unexpected-rxjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Funexpected-rxjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Funexpected-rxjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Funexpected-rxjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Funexpected-rxjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boneskull","download_url":"https://codeload.github.com/boneskull/unexpected-rxjs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Funexpected-rxjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270810910,"owners_count":24650014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assert","assertion-library","assertions","expect","observable","rxjs","test","unexpected"],"created_at":"2024-10-03T01:29:52.613Z","updated_at":"2025-08-17T05:31:32.079Z","avatar_url":"https://github.com/boneskull.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# unexpected-rxjs\n\n\u003e 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- `\u003cObservable\u003e 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- `\u003cObservable\u003e [not] to emit (value|values) \u003cany+\u003e` - Asserts an `Observable` emits one or more values using object equivalence.\n- `\u003cObservable\u003e [not] to emit times \u003ccount\u003e` - Asserts an `Observable` emits _count_ times.\n- `\u003cObservable\u003e [not] to emit (once|twice|thrice)` - Sugar for previous assertion.\n- `\u003cObservable\u003e [not] to emit error \u003cany?\u003e` - Asserts an `Observable` emits an \"error\"; uses Unexpected's default error matching.\n- `\u003cObservable\u003e to emit error [exhaustively] satisfying \u003cany\u003e` - Asserts an `Observable` emits an \"error\" using \"to satisfy\" semantics.\n- `\u003cObservable\u003e [not] to complete with value \u003cany+\u003e` - Assert when an `Observable` completes, it has emitted one or more matching values.\n- `\u003cObservable\u003e [not] to complete with value [exhaustively] satisfying \u003cany+\u003e` - Same as previous, except using \"to satisfy\" semantics.\n- `\u003cObservable\u003e when complete \u003cassertion\u003e` - Akin to Unexpected's `\u003cPromise\u003e when fulfilled \u003cassertion\u003e` syntax.\n\n## Development\n\nExecute `npm run build` to bundle the project for distribution.\n\n## Notes\n\n- `\u003cObservable\u003e [not] to complete with value [exhaustively] satisfying \u003cany+\u003e` has some significant performance issues.\n\n## License\n\nCopyright © 2019 IBM. Licensed Apache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboneskull%2Funexpected-rxjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboneskull%2Funexpected-rxjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboneskull%2Funexpected-rxjs/lists"}