{"_id":"@charisma-ai/event-emitter-tester","_rev":"17-0f3d362b535e2af76aec6b00435b796b","name":"@charisma-ai/event-emitter-tester","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@charisma-ai/event-emitter-tester","version":"0.0.1","author":{"name":"To Play For"},"license":"MIT","_id":"@charisma-ai/event-emitter-tester@0.0.1","maintainers":[{"name":"benhjames","email":"benhjames@sky.com"}],"dist":{"shasum":"70d007314844e1848ed50efff71451c219cca5d1","tarball":"https://registry.npmjs.org/@charisma-ai/event-emitter-tester/-/event-emitter-tester-0.0.1.tgz","fileCount":10,"integrity":"sha512-u4msmmUKIixKTM2AXITxXAUFlCO5nKTrd3tpTddRebC6hAXmNk181MrBCJ0jKQ0R77nFYPwqhCTfW4QLsn9QkQ==","signatures":[{"sig":"MEUCIDwBGgZLZkwg+/Zo7xboXpp6Vh97cxH02Bgdyp+0eSm0AiEA7YBq/YZbXQlclpfaGfSE+oQ9z4a46KGyDG9rzK+Bygw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjhf2CRA9TVsSAnZWagAAtbAP/3d+ZrtXo1CYROmhATlO\nQCfS/eAJ2BsfgRHZo5wfQNxxoUSwB3dfEjzc45ZhZ/hMq9iArPhVfiSGthKR\np/sCUIEhoudAUEDIlsGeukQ+G9If1WeEag99tuMpfhCj994pVHkZF3Aye+Dx\nAiqMFFYH9hVzQ6wlXxNUfBkk2znDqxitBeFWtvLZNgs3GF1k+0NC8yyq56xD\ntvkGUdUiTO6g4aaDY3vrAqNWRhIrKWag1NqfPwQA6cTQsWvbx0xsuE4HmD4/\nxlVQ3fLbjJFh3M3S/KQFD89JyDJrBilDVtt1JN8COTPQY7R5CafCS8AjMDrw\nPF0tgTiViOn7uEn7w3tgpruA8CW/uIRnvidTZa4eFvJPbh9bSOT5+x01ZtRI\n0tiv5TNJvbve5lxmXapHxeqEX5sS+uWqaSFeQsnptTOeOYN4COKrb+8Zrgnq\n7nSS7+exsTw8F903NsjICfMRYFCYp+mLkQvoe5u/5u2Y2GOIykGwm+wR4IzT\n9fWuY26CXZZ+a5g0vat0JoyVCfiF1TwgIuWA+rzL1WeuNg7aMfROYwdJfCRF\n9yyGaNyWWBfzVzQZPfJs/eQrHWtxISl1Mw1hychoPSAG6NugIoQJyrsiUjAc\n5MVTxupWHRGT1uBHef0eIvwqZyMmrXTj83vGwBBrigSamYjYUFCPmPyf82fT\n0OrI\r\n=BNHt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"scripts":{"cm":"git-cz","lint":"eslint --fix --ext js,ts,tsx .","build":"cross-env NODE_ENV=production tsc","prepublish":"yarn run build","semantic-release":"semantic-release"},"_npmUser":{"name":"benhjames","email":"benhjames@sky.com"},"repository":{"url":"https://github.com/charisma-ai/event-emitter-tester","type":"git"},"description":"Tester for emitters with on/off interface","directories":{},"dependencies":{"p-queue":"^6.1.1"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^3.0.5","eslint":"^6.3.0","rimraf":"^3.0.0","prettier":"^1.18.2","cross-env":"^5.2.1","commitizen":"^4.0.3","typescript":"~3.6.3","lint-staged":"^9.2.5","semantic-release":"^15.13.24","eslint-plugin-import":"^2.18.2","eslint-config-prettier":"^6.3.0","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-prettier":"^3.1.0","@typescript-eslint/parser":"^2.2.0","cz-conventional-changelog":"^3.0.2","eslint-config-airbnb-base":"^14.0.0","@typescript-eslint/eslint-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/event-emitter-tester_0.0.1_1569593334124_0.9643381366471673","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@charisma-ai/event-emitter-tester","version":"0.0.2","author":{"name":"To Play For"},"license":"MIT","_id":"@charisma-ai/event-emitter-tester@0.0.2","maintainers":[{"name":"benhjames","email":"benhjames@sky.com"}],"dist":{"shasum":"bc1db77d4e91e04ed8c6726aac6fa4502d6766bc","tarball":"https://registry.npmjs.org/@charisma-ai/event-emitter-tester/-/event-emitter-tester-0.0.2.tgz","fileCount":10,"integrity":"sha512-tNpz+NZVgN09UPPETAwxNVmI/6JY44JXoESWCfKvx7rumkQzd2fh1W3h1ZSkGxb8nNRy96JUcPkq8eAuRR+9xA==","signatures":[{"sig":"MEQCIHofxhdlb+RsQYMNcvUpSEowBtJaY+rDh+EjxksVo5YNAiAto4/q5JwHoHZ5yBlcf4gOJsBMkC1+vX6iaNaOjMgjXw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjhwpCRA9TVsSAnZWagAANuMP/iHhrXj/0KXVOIJcFwKj\n+ovNfimlCu2oD2HqybVpaWQh+80uWlmbdXCxOnzx0xhhvYIdXidZKJb2rnKO\nizvLZq3x609A8NPXBYdZbQR+pgdr/6Hi8nxKkR2GeY/3h8UW5WlO1dq6rS2r\nXRjX5bvMIbgSrzok28x1G1LBPZjvGNhCMhG97WzoaflCAAnAncVJ6Afm/AHT\njjwHjrMPqFj2nVYddk+cuuQb3XW5hvrTUWdUiifFTTfhdq5GEdiM8Wa1b8wL\nQKuiU2YUHpVuIn7wVNc353qWAfVijqDz4aWnZ85ygWETRTrGYfeO8XHvfhA0\nh9SM8MUhn3et051C7PeLY5kSh22IlgOGUHo6lJQ3iv1OO0F4gsb/yADNhMs6\nLs54LEwpw7AVdNlr5FBvXeFea+ZJxjKKyb0UXsKl8UUVIpFGbNXCOA4MDkem\nSrXUka8BiQnK1LTMfZsguy3pcCkkeLI+w3rlIi7Y5yA/kYH6ecBzHNTAvBhp\n4z4hE2pZ+id3SNu94sL5baU9CyHEj1igiH0PEOL112wVv6Ch92m58d41p/Fa\npUt9r4QvX/gi9LAKFU6+l9MEaJWicjhB1ScIFgcaqh4Khf6nww/7Wlvyw7ks\ng5DvFitXbEPlh9uxnsYem1UkHQIibpKSXRwMFAIYOWeRnpH0Ymr8NDdPi5Dw\n/EDY\r\n=EyEC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"scripts":{"cm":"git-cz","lint":"eslint --fix --ext js,ts,tsx .","build":"cross-env NODE_ENV=production tsc","prepublish":"yarn run build","semantic-release":"semantic-release"},"_npmUser":{"name":"benhjames","email":"benhjames@sky.com"},"repository":{"url":"https://github.com/charisma-ai/event-emitter-tester","type":"git"},"description":"Tester for emitters with on/off interface","directories":{},"dependencies":{"p-queue":"^6.1.1"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^3.0.5","eslint":"^6.3.0","rimraf":"^3.0.0","prettier":"^1.18.2","cross-env":"^5.2.1","commitizen":"^4.0.3","typescript":"~3.6.3","lint-staged":"^9.2.5","semantic-release":"^15.13.24","eslint-plugin-import":"^2.18.2","eslint-config-prettier":"^6.3.0","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-prettier":"^3.1.0","@typescript-eslint/parser":"^2.2.0","cz-conventional-changelog":"^3.0.2","eslint-config-airbnb-base":"^14.0.0","@typescript-eslint/eslint-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/event-emitter-tester_0.0.2_1569594408358_0.8902594583707584","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@charisma-ai/event-emitter-tester","version":"0.0.3","author":{"name":"To Play For"},"license":"MIT","_id":"@charisma-ai/event-emitter-tester@0.0.3","maintainers":[{"name":"benhjames","email":"benhjames@sky.com"}],"dist":{"shasum":"6d3de7e0f6ca54b05379a67add68d7423d035f99","tarball":"https://registry.npmjs.org/@charisma-ai/event-emitter-tester/-/event-emitter-tester-0.0.3.tgz","fileCount":10,"integrity":"sha512-xRfH4tGlvAHq6FbbxEeqHFdE6AhUxNHxlVusdhbNI0cJBE+TXbQMkhEkFhnCuSXP4v87hTnicV87OfXklrNa7A==","signatures":[{"sig":"MEUCIQDYV+e1yxqBMiCPaBAkhzDBbA3qGofauT5No07tlLI3IAIgdKmHSTA2RUbp+q1gor0MpswaHsDlEVCEzDPcvl6Zj5k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjhzfCRA9TVsSAnZWagAAH+UQAJxpqPZkbNoNLQHRTzqY\nn+vkWQNIMcQjaPZBoW5b2DXz2FKDP3lhX+2/oAqDfwLJ+oRxxunxBG8guRnI\nvAGjNlbtWnQ8FVdMARFeDmCVOUx2O2JzT3B7TOSlwwYrO9JRTCyPXX4y2+Kf\ngJYAa/TRy29FguwvdIG0Uqiw1q4GjA/S8VS/QbkWf4IKhEvbmbuEdePe+SZT\nopw/WAPnHf0nmWRYaLAboOXbG3Vkjz82I34JFA69/SvzPFlK7JkazNxw50lf\nQRp/vqlREGlYgj6VhFHiSFtn2FKV5ZTQtVcdptjvAcmdAtgJPM7w3zzfrx4q\nI9UqoYsffaGX108aVsZ57f9rurCZUvOjIa4xYBKMHAZORQNpQJWMqQ83JoPm\nArwayCRTe/USCLtyAhDFx6Why3LsrYOZM6nW5kZ2DQBNdq5AOr3Pw5xvn306\nU0Sx8ZhIcbZbZxzBdol1DAjSwwdAdoumm8NKvVekXUPEQXMdTL9Vzyo/Goih\nJxNHLTrfNm0yT5BKnLW3CqPne8hppL3KYNeTW6ZL345yvtjM/oiHEUYf6SB4\n34eLAmlT35CK8FofOig8o//EWvj9kyNuNXGhFM057Ih/nj9jv7V2XQsXzxpu\ns5s/3JxDNKezfMfP/g9H0EGbjb4FgJoFBa7X4Wp1ylkIFF6pMM0TxYSMM2qS\n9cXe\r\n=bHhZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"scripts":{"cm":"git-cz","lint":"eslint --fix --ext js,ts,tsx .","build":"cross-env NODE_ENV=production tsc","prepublish":"yarn run build","semantic-release":"semantic-release"},"_npmUser":{"name":"benhjames","email":"benhjames@sky.com"},"repository":{"url":"https://github.com/charisma-ai/event-emitter-tester","type":"git"},"description":"Tester for emitters with on/off interface","directories":{},"dependencies":{"p-queue":"^6.1.1"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^3.0.5","eslint":"^6.3.0","rimraf":"^3.0.0","prettier":"^1.18.2","cross-env":"^5.2.1","commitizen":"^4.0.3","typescript":"~3.6.3","lint-staged":"^9.2.5","semantic-release":"^15.13.24","eslint-plugin-import":"^2.18.2","eslint-config-prettier":"^6.3.0","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-prettier":"^3.1.0","@typescript-eslint/parser":"^2.2.0","cz-conventional-changelog":"^3.0.2","eslint-config-airbnb-base":"^14.0.0","@typescript-eslint/eslint-plugin":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/event-emitter-tester_0.0.3_1569594590447_0.5579478141227237","host":"s3://npm-registry-packages"}}},"time":{"created":"2019-09-27T14:08:54.124Z","modified":"2025-12-16T18:15:41.057Z","0.0.1":"2019-09-27T14:08:54.262Z","0.0.2":"2019-09-27T14:26:48.454Z","0.0.3":"2019-09-27T14:29:50.566Z"},"author":{"name":"To Play For"},"license":"MIT","repository":{"url":"https://github.com/charisma-ai/event-emitter-tester","type":"git"},"description":"Tester for emitters with on/off interface","maintainers":[{"email":"jjames6308@gmail.com","name":"john-a-j"},{"email":"oscarw@charisma.ai","name":"oscarwilkinson"}],"readme":"# Event Emitter Tester\n\nA utility to make testing event emitters simpler.\n\n## Usage\n\n```\nyarn add @charisma-ai/event-emitter-tester\n```\n\n```js\nimport EventEmitterTester from \"@charisma-ai/event-emitter-tester\";\n\nclass MyTester extends EventEmitterTester {\n  constructor(emitter, options = {}) {\n    super(emitter, options);\n  }\n\n  reply(text: string): MyTester {\n    this.addToQueue(() => {\n      // do your event here...\n    });\n    return this;\n  }\n\n  awaitMessage(callback: (message: string) => void): MyTester {\n    this.awaitEvent(\"message\", callback);\n    return this;\n  }\n}\n\nasync function run() {\n  const tester = new MyTester(emitter, { timeout: 5000 });\n  await tester\n    .reply(\"Hello!\")\n    .reply(\"How are you?\")\n    .awaitMessage(message => expect(message).toEqual(\"Great thanks\"))\n    .reply(\"Ideal!\")\n    .awaitMessage(message => expect(message).toEqual(\"Indeed.\"))\n    .run();\n  console.log(\"Complete!\");\n}\n```\n","readmeFilename":"README.md"}