{"id":19841270,"url":"https://github.com/codelenny/chai-events","last_synced_at":"2026-05-12T18:36:17.385Z","repository":{"id":57196537,"uuid":"84479914","full_name":"CodeLenny/chai-events","owner":"CodeLenny","description":"Make assertions about event emitters","archived":false,"fork":false,"pushed_at":"2019-01-16T18:26:50.000Z","size":66,"stargazers_count":0,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T06:53:45.111Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeLenny.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-09T19:23:00.000Z","updated_at":"2019-01-16T18:26:51.000Z","dependencies_parsed_at":"2022-09-15T15:41:05.903Z","dependency_job_id":null,"html_url":"https://github.com/CodeLenny/chai-events","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLenny%2Fchai-events","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLenny%2Fchai-events/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLenny%2Fchai-events/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeLenny%2Fchai-events/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeLenny","download_url":"https://codeload.github.com/CodeLenny/chai-events/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241210613,"owners_count":19927816,"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":[],"created_at":"2024-11-12T12:29:51.931Z","updated_at":"2026-05-12T18:36:17.348Z","avatar_url":"https://github.com/CodeLenny.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chai Events\n\n[![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=dHZBczZFaDMraUtrcnNNSTZzVHpRN056ZzU1VHZoclI2S3R6OFRkRGpBYz0tLWcwWndCVUFlTW1jQTlLWjBqc0ZwdVE9PQ==--9ca2d6648ca4fcb5a1bb63e255daf0c6dc46d18c)](https://www.browserstack.com/automate/public-build/dHZBczZFaDMraUtrcnNNSTZzVHpRN056ZzU1VHZoclI2S3R6OFRkRGpBYz0tLWcwWndCVUFlTW1jQTlLWjBqc0ZwdVE9PQ==--9ca2d6648ca4fcb5a1bb63e255daf0c6dc46d18c)\n\nMake assertions about event emitters.\n\n```js\nconst chai = require(\"chai\");\nchai.use(require(\"chai-events\"));\nconst should = chai.should();\nconst EventEmitter = require(\"events\");\n\ndescribe(\"Event Emitting\", function() {\n\n  let emitter = null;\n  beforeEach(function() {\n    emitter = new EventEmitter();\n  });\n\n  it(\"should get emitted events\", function() {\n    let p = emitter.should.emit(\"get\");\n    setTimeout(function() {\n      emitter.emit(\"get\");\n    }, 200);\n    return p;\n  });\n\n  it(\"should handle non-emitted events\", function() {\n    emitter.should.not.emit(\"missing\");\n  });\n\n  it(\"can be configured\", function() {\n    emitter.should.not.emit(\"another missing\", {\n      timeout: 50, // in milliseconds\n    });\n  });\n\n});\n```\n\n## Browser Usage\n\n*Browser testing powered by BrowserStack*  \n[![BrowserStack](/docs/img/browserstack-logo-600x315.png)](https://www.browserstack.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelenny%2Fchai-events","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodelenny%2Fchai-events","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelenny%2Fchai-events/lists"}