{"id":20354346,"url":"https://github.com/hemerajs/hemera-testsuite","last_synced_at":"2025-04-12T02:33:11.992Z","repository":{"id":57262762,"uuid":"75511551","full_name":"hemerajs/hemera-testsuite","owner":"hemerajs","description":"Helper library to write tests for Hemera.","archived":false,"fork":false,"pushed_at":"2018-05-31T08:50:22.000Z","size":172,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T02:32:06.775Z","etag":null,"topics":["hemera","testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/hemerajs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-04T01:50:28.000Z","updated_at":"2018-05-31T08:50:23.000Z","dependencies_parsed_at":"2022-08-25T06:11:04.517Z","dependency_job_id":null,"html_url":"https://github.com/hemerajs/hemera-testsuite","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemerajs%2Fhemera-testsuite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemerajs%2Fhemera-testsuite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemerajs%2Fhemera-testsuite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemerajs%2Fhemera-testsuite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hemerajs","download_url":"https://codeload.github.com/hemerajs/hemera-testsuite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248506924,"owners_count":21115509,"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","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":["hemera","testing"],"created_at":"2024-11-14T23:08:17.831Z","updated_at":"2025-04-12T02:33:11.968Z","avatar_url":"https://github.com/hemerajs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm](https://img.shields.io/npm/v/hemera-testsuite.svg?maxAge=3600)](https://github.com/hemerajs/hemera-testsuite)\n[![Build Status](https://travis-ci.org/hemerajs/hemera-testsuite.svg?branch=master)](https://travis-ci.org/hemerajs/hemera-testsuite)\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/hemerajs/hemera)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com)\n\n# hemera-testsuite\nHelper library to write tests against NATS.\n\n## Use cases\n\n- You want to create an integration test (cluster support)\n- You want to run in-memory tests\n\n## Prerequisites\n\n[Install](https://nats.io/documentation/tutorials/gnatsd-install/) NATS Server and include the path to the executable in your user `PATH` environment variable. (Only needed for integration tests)\n\n## Installing\n\n```\nnpm i hemera-testsuite\n```\n\n## Emulate NATS\nWe emulate all core features of NATS server. You can run and test your service in memory.\n\n### Features\n\n- Support of wildcard `*` and `\u003e` subjects\n- Support for maxMessages$, expectedMessages$ options\n- Support for request \u0026 publish\n- Support for timeouts\n\n### Not supported*\n\n- Custom queue groups\n- Special one-to-one publish\n- Load balancing\n- Connection related states\n\n\\**In this case we recommend to start a real NATS Server.*\n\n```js\nconst Hemera = require('nats-hemera')\nconst Nats = require('hemera-testsuite/nats')\nconst nats = new Nats()\nconst hemera = new Hemera(nats, {\n  logLevel: 'info'\n})\n```\n\n## Full Integration test\n\n- Run your tests against a real NATS server\n\n[Example](https://github.com/hemerajs/hemera/blob/master/test/hemera/index.spec.js)\n\n## Credits\nThanks to [node-nats](https://github.com/nats-io/node-nats) for providing the script to bootstrap the server.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhemerajs%2Fhemera-testsuite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhemerajs%2Fhemera-testsuite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhemerajs%2Fhemera-testsuite/lists"}