{"id":21213855,"url":"https://github.com/ksm2/jest-stream-marbles","last_synced_at":"2026-05-12T16:03:38.742Z","repository":{"id":57280466,"uuid":"432532602","full_name":"ksm2/jest-stream-marbles","owner":"ksm2","description":"Jest extension to test WHATWG Streams with marble syntax","archived":false,"fork":false,"pushed_at":"2021-11-28T13:34:04.000Z","size":255,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-05T22:08:45.402Z","etag":null,"topics":["jest","marble-testing","streams-api","whatwg-streams"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ksm2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-27T18:06:29.000Z","updated_at":"2021-11-28T13:34:08.000Z","dependencies_parsed_at":"2022-09-19T17:10:40.078Z","dependency_job_id":null,"html_url":"https://github.com/ksm2/jest-stream-marbles","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ksm2/jest-stream-marbles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksm2%2Fjest-stream-marbles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksm2%2Fjest-stream-marbles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksm2%2Fjest-stream-marbles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksm2%2Fjest-stream-marbles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ksm2","download_url":"https://codeload.github.com/ksm2/jest-stream-marbles/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksm2%2Fjest-stream-marbles/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32946410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T09:19:52.626Z","status":"ssl_error","status_checked_at":"2026-05-12T09:17:33.438Z","response_time":102,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["jest","marble-testing","streams-api","whatwg-streams"],"created_at":"2024-11-20T21:24:19.857Z","updated_at":"2026-05-12T16:03:38.714Z","avatar_url":"https://github.com/ksm2.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jest-stream-marbles\n\n[![Node.js CI](https://github.com/ksm2/jest-stream-marbles/actions/workflows/node.js.yml/badge.svg)](https://github.com/ksm2/jest-stream-marbles/actions/workflows/node.js.yml)\n[![NPM version](https://img.shields.io/npm/v/jest-stream-marbles)](https://www.npmjs.com/package/jest-stream-marbles)\n[![license](https://img.shields.io/github/license/ksm2/jest-stream-marbles)](https://opensource.org/licenses/MIT)\n![TypeScript types](https://img.shields.io/npm/types/jest-stream-marbles)\n\n\u003e Jest extension to test [WHATWG Streams] with [Marble Syntax]\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [See Also](#see-also)\n- [License](#license)\n\n## Install\n\nUse either\n\n    yarn add jest-stream-marbles\n\nor\n\n    npm install jest-stream-marbles\n\n## Usage\n\nThis module allows you to test [WHATWG Streams] with [Marble Syntax] in Jest.\n\n```js\nimport { marbles } from \"jest-stream-marbles\";\nimport { filter } from \"stream-transformers\";\n\ndescribe(\"filter\", () =\u003e {\n  it(\"should filter a stream by a predicate\", async () =\u003e {\n    const act = marbles`---${1}-${2}--${3}-${4}---|`;\n    const exp = marbles`--------${2}-------${4}---|`;\n\n    await expect(act.pipeThrough(filter(isEven))).toStream(exp);\n  });\n\n  it(\"should fail the other stream\", async () =\u003e {\n    const act = marbles`---${1}-${2}--x`;\n    const exp = marbles`--------${2}--x`;\n\n    await expect(act.pipeThrough(filter(isEven))).toStream(exp);\n  });\n});\n\nfunction isEven(num: number): boolean {\n  return num % 2 === 0;\n}\n```\n\n## Contributing\n\nThis project is open to feedback and contributions, [please open an issue](https://github.com/ksm2/jest-stream-marbles/issues).\n\n`jest-stream-marbles` follows the [Contributor Covenant] Code of Conduct.\n\n## See Also\n\nAlso have a look at the following NPM Packages:\n\n- [isomorphic-streams](https://github.com/ksm2/isomorphic-streams) - Isomorphic package for WHATWG Streams in Node.js and the browser.\n- [stream-transformers](https://github.com/ksm2/stream-transformers) - Reusable stream transformers similar to ReactiveX Operators.\n\n## License\n\nMIT © 2021 Konstantin Möllers, see [LICENSE].\n\n[whatwg streams]: https://streams.spec.whatwg.org/\n[marble syntax]: https://rxjs.dev/guide/testing/marble-testing\n[license]: https://github.com/ksm2/jest-stream-marbles/blob/main/LICENSE\n[contributor covenant]: https://github.com/ksm2/jest-stream-marbles/blob/main/CODE_OF_CONDUCT.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksm2%2Fjest-stream-marbles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fksm2%2Fjest-stream-marbles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksm2%2Fjest-stream-marbles/lists"}