{"_id":"sierra-conversation","_rev":"33-4a578b92546188082da9ceaa0b87788c","name":"sierra-conversation","description":"Node module which provides fluent testing of complex TCP servers and protocols.","dist-tags":{"latest":"1.5.1"},"versions":{"1.0.0":{"author":{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"},"name":"sierra-conversation","description":"Node module which provides fluent testing of complex TCP servers and protocols.","keywords":["fluent","tcp","testing","server","protocol"],"version":"1.0.0","license":"MIT","repository":{"url":"http://github.com/SierraSoftworks/node-conversation"},"contributors":[{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"}],"scripts":{"test":"node test/run"},"main":"./lib/conversation","engines":{"node":"*"},"analyse":false,"dependencies":{"lodash":"*","should":"*"},"readme":"# Conversations\r\nThis module is designed to provide developers with an extremely powerful testing framework for complex TCP servers which generally require a large amount of boilerplate code or custom test functions. This module provides a fluent, easy to use and incredibly powerful framework on which extremely complex protocols can be tested.\r\n\r\n## Example\r\nAll these things start out with an example of how you can use the test framework. The following is an example of using *node-conversation* with *Mocha*.\r\n\r\n```js\r\nvar Conversation = require('conversation');\r\n\r\ndescribe('protocol', function() {\r\n\tit('should forward messages to the correct user', function(done) {\r\n\t\tnew Conversation({ port: 9119 })\r\n\t\t\t.client('u1').u1.sendAnd('LOGIN:user1;').expect('OK;')\r\n\t\t\t.client('u2').u2.sendAnd('LOGIN:user2;').expect('OK;')\r\n\t\t\t.client('u3').u3.sendAnd('LOGIN:user3;').expect('OK;')\r\n\r\n\t\t\t.u1.writeAnd('CHAT:user2:hello;').expect('SENT:1;')\r\n\t\t\t.u2.expect('MESSAGE:user1:hello;')\r\n\t\t\t.u1.read('RECEIVED:1;')\r\n\r\n\t\t\t.u2.writeAnd('CHAT:user3:hi;').read('SENT:2;')\r\n\t\t\t.u3.read('MESSAGE:user2:hi;')\r\n\t\t\t.u2.read('RECEIVED:2;')\r\n\r\n\t\t\t.run(done);\r\n\t});\r\n});\r\n```\r\n\r\n## Extensibility\r\nDue to its design, it is extremely easy to automate common testing tasks (for example, login processes) by adding to the `Conversation.prototype` or `Conversations.Client.prototype`. This can help make testing systems which require setup tasks to be performed considerably easier.","readmeFilename":"README.md","bugs":{"url":"https://github.com/SierraSoftworks/node-conversation/issues"},"_id":"sierra-conversation@1.0.0","dist":{"shasum":"ce5680a511a9d14a95e6e16626f190e0855ef2ce","tarball":"https://registry.npmjs.org/sierra-conversation/-/sierra-conversation-1.0.0.tgz","integrity":"sha512-p4cy4Qh/upnFDHi8Q3g818iSz73lgKGoW4VcvQZF/j0El8ErHgce2XmovhFRq51yOMUWh4l2Jrc1LhPFh3Cn3Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDnxpzqrUYqE0V9TBE4zntgdAEx3JHyjaSSEQgSJ2D+KAIhAKFi/5IyE2CP2vXjfxzXvCCYnZQK8+VyLv+8uBCgfBaa"}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"spartan563","email":"benjamin.pannell@gmail.com"},"maintainers":[{"name":"spartan563","email":"benjamin.pannell@gmail.com"}],"directories":{}},"1.1.0":{"author":{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"},"name":"sierra-conversation","description":"Node module which provides fluent testing of complex TCP servers and protocols.","keywords":["fluent","tcp","testing","server","protocol"],"version":"1.1.0","license":"MIT","repository":{"url":"http://github.com/SierraSoftworks/node-conversation"},"contributors":[{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"}],"scripts":{"test":"node test/run"},"main":"./lib/Conversation","engines":{"node":"*"},"analyse":false,"dependencies":{"lodash":"*","should":"*"},"readme":"# Conversations\r\nThis module is designed to provide developers with an extremely powerful testing framework for complex TCP servers which generally require a large amount of boilerplate code or custom test functions. This module provides a fluent, easy to use and incredibly powerful framework on which extremely complex protocols can be tested.\r\n\r\n## Example\r\nAll these things start out with an example of how you can use the test framework. The following is an example of using *node-conversation* with *Mocha*.\r\n\r\n```js\r\nvar Conversation = require('conversation');\r\n\r\ndescribe('protocol', function() {\r\n\tit('should forward messages to the correct user', function(done) {\r\n\t\tnew Conversation({ port: 9119 })\r\n\t\t\t.client('u1').u1.sendAnd('LOGIN:user1;').expect('OK;')\r\n\t\t\t.client('u2').u2.sendAnd('LOGIN:user2;').expect('OK;')\r\n\t\t\t.client('u3').u3.sendAnd('LOGIN:user3;').expect('OK;')\r\n\r\n\t\t\t.u1.writeAnd('CHAT:user2:hello;').expect('SENT:1;')\r\n\t\t\t.u2.expect('MESSAGE:user1:hello;')\r\n\t\t\t.u1.read('RECEIVED:1;')\r\n\r\n\t\t\t.u2.writeAnd('CHAT:user3:hi;').read('SENT:2;')\r\n\t\t\t.u3.read('MESSAGE:user2:hi;')\r\n\t\t\t.u2.read('RECEIVED:2;')\r\n\r\n\t\t\t.run(done);\r\n\t});\r\n});\r\n```\r\n\r\n## Extensibility\r\nDue to its design, it is extremely easy to automate common testing tasks (for example, login processes) by adding to the `Conversation.prototype` or `Conversations.Client.prototype`. This can help make testing systems which require setup tasks to be performed considerably easier.","readmeFilename":"README.md","bugs":{"url":"https://github.com/SierraSoftworks/node-conversation/issues"},"_id":"sierra-conversation@1.1.0","dist":{"shasum":"9909ac82206d4276b093eba7b3125448d1ce0bde","tarball":"https://registry.npmjs.org/sierra-conversation/-/sierra-conversation-1.1.0.tgz","integrity":"sha512-MK2/KF9aQXWn42hRxVAzDWyBbeUzCmlsw9cSfRknWyq+bPPnzmqb0M1XYPqtn7tBLh4hiGPKznTw8uyFEpqbrg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCH0Sk/uIJOURQ1YuGwVnEdtLK9Zjda09VTY7EmjAxGWMCIQDyqNoAVs/oiqOSBGXSlMIrih6v0j51W3UsKdTYbMvUqA=="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"spartan563","email":"benjamin.pannell@gmail.com"},"maintainers":[{"name":"spartan563","email":"benjamin.pannell@gmail.com"}],"directories":{}},"1.2.0":{"author":{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"},"name":"sierra-conversation","description":"Node module which provides fluent testing of complex TCP servers and protocols.","keywords":["fluent","tcp","testing","server","protocol"],"version":"1.2.0","license":"MIT","repository":{"url":"http://github.com/SierraSoftworks/node-conversation"},"contributors":[{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"}],"scripts":{"test":"node test/run"},"main":"./lib/Conversation","engines":{"node":"*"},"analyse":false,"dependencies":{"lodash":"*","should":"*"},"readme":"# Conversations\r\nThis module is designed to provide developers with an extremely powerful testing framework for complex TCP servers which generally require a large amount of boilerplate code or custom test functions. This module provides a fluent, easy to use and incredibly powerful framework on which extremely complex protocols can be tested.\r\n\r\n## Example\r\nAll these things start out with an example of how you can use the test framework. The following is an example of using *node-conversation* with *Mocha*.\r\n\r\n```js\r\nvar Conversation = require('conversation');\r\n\r\ndescribe('protocol', function() {\r\n\tit('should forward messages to the correct user', function(done) {\r\n\t\tnew Conversation({ port: 9119 })\r\n\t\t\t.client('u1').u1.sendAnd('LOGIN:user1;').expect('OK;')\r\n\t\t\t.client('u2').u2.sendAnd('LOGIN:user2;').expect('OK;')\r\n\t\t\t.client('u3').u3.sendAnd('LOGIN:user3;').expect('OK;')\r\n\r\n\t\t\t.u1.writeAnd('CHAT:user2:hello;').expect('SENT:1;')\r\n\t\t\t.u2.expect('MESSAGE:user1:hello;')\r\n\t\t\t.u1.read('RECEIVED:1;')\r\n\r\n\t\t\t.u2.writeAnd('CHAT:user3:hi;').read('SENT:2;')\r\n\t\t\t.u3.read('MESSAGE:user2:hi;')\r\n\t\t\t.u2.read('RECEIVED:2;')\r\n\r\n\t\t\t.run(done);\r\n\t});\r\n});\r\n```\r\n\r\n## Extensibility\r\nDue to its design, it is extremely easy to automate common testing tasks (for example, login processes) by adding to the `Conversation.prototype` or `Conversations.Client.prototype`. This can help make testing systems which require setup tasks to be performed considerably easier.","readmeFilename":"README.md","bugs":{"url":"https://github.com/SierraSoftworks/node-conversation/issues"},"_id":"sierra-conversation@1.2.0","dist":{"shasum":"751fb0475de41233394a570e03cbfef466c0aba3","tarball":"https://registry.npmjs.org/sierra-conversation/-/sierra-conversation-1.2.0.tgz","integrity":"sha512-WtfrRTBiYUEwIQ2qEMpmdl/O8bcEYE1sOzI8EghKI2hXEA3hwrUE9PZDZu+X4KRKRwrqA70RMaqCEV42miV5IQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlXonn+KemgLdopTFvCLlYfG/6b/gPq0gARrpVASJBmQIhAJyPzhJOr8P2cAqTm8aD9o+RLRtTUsKRZrpfXoaOVpaU"}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"spartan563","email":"benjamin.pannell@gmail.com"},"maintainers":[{"name":"spartan563","email":"benjamin.pannell@gmail.com"}],"directories":{}},"1.3.0":{"author":{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"},"name":"sierra-conversation","description":"Node module which provides fluent testing of complex TCP servers and protocols.","keywords":["fluent","tcp","testing","server","protocol"],"version":"1.3.0","license":"MIT","repository":{"url":"http://github.com/SierraSoftworks/node-conversation"},"contributors":[{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"}],"scripts":{"test":"node test/run"},"main":"./lib/Conversation","engines":{"node":"*"},"analyse":false,"dependencies":{"lodash":"*","should":"*"},"readme":"# Conversations\r\nThis module is designed to provide developers with an extremely powerful testing framework for complex TCP servers which generally require a large amount of boilerplate code or custom test functions. This module provides a fluent, easy to use and incredibly powerful framework on which extremely complex protocols can be tested.\r\n\r\n## Example\r\nAll these things start out with an example of how you can use the test framework. The following is an example of using *node-conversation* with *Mocha*.\r\n\r\n```js\r\nvar Conversation = require('conversation');\r\n\r\ndescribe('protocol', function() {\r\n\tit('should forward messages to the correct user', function(done) {\r\n\t\tnew Conversation({ port: 9119 })\r\n\t\t\t.client('u1').u1.sendAnd('LOGIN:user1;').expect('OK;')\r\n\t\t\t.client('u2').u2.sendAnd('LOGIN:user2;').expect('OK;')\r\n\t\t\t.client('u3').u3.sendAnd('LOGIN:user3;').expect('OK;')\r\n\r\n\t\t\t.u1.writeAnd('CHAT:user2:hello;').expect('SENT:1;')\r\n\t\t\t.u2.expect('MESSAGE:user1:hello;')\r\n\t\t\t.u1.read('RECEIVED:1;')\r\n\r\n\t\t\t.u2.writeAnd('CHAT:user3:hi;').read('SENT:2;')\r\n\t\t\t.u3.read('MESSAGE:user2:hi;')\r\n\t\t\t.u2.read('RECEIVED:2;')\r\n\r\n\t\t\t.run(done);\r\n\t});\r\n});\r\n```\r\n\r\n## Extensibility\r\nDue to its design, it is extremely easy to automate common testing tasks (for example, login processes) by adding to the `Conversation.prototype` or `Conversations.Client.prototype`. This can help make testing systems which require setup tasks to be performed considerably easier.","readmeFilename":"README.md","bugs":{"url":"https://github.com/SierraSoftworks/node-conversation/issues"},"_id":"sierra-conversation@1.3.0","dist":{"shasum":"b13e2ba5f4263c7ae9e446282730138734b04c50","tarball":"https://registry.npmjs.org/sierra-conversation/-/sierra-conversation-1.3.0.tgz","integrity":"sha512-3whm15UPBAhHDDrJs69160oXYHPyBhKQ7ih+d30+whDnDUQKie78yvco7uXU4TPjCyGVuKFipkeFUjkIpJ4gvg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC81ZidY9V2K1zmARNVZ+JplsIMjcxw5P4YHlqv/Y5IJAIhAMYc1BZE4u5QSNG6B+0cGnd00sgouZ5d+sCiKoi/ytx3"}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"spartan563","email":"benjamin.pannell@gmail.com"},"maintainers":[{"name":"spartan563","email":"benjamin.pannell@gmail.com"}],"directories":{}},"1.3.1":{"author":{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"},"name":"sierra-conversation","description":"Node module which provides fluent testing of complex TCP servers and protocols.","keywords":["fluent","tcp","testing","server","protocol"],"version":"1.3.1","license":"MIT","repository":{"url":"http://github.com/SierraSoftworks/node-conversation"},"contributors":[{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"}],"scripts":{"test":"node test/run"},"main":"./lib/Conversation","engines":{"node":"*"},"analyse":false,"dependencies":{"lodash":"*","should":"*"},"readme":"# Conversations\r\nThis module is designed to provide developers with an extremely powerful testing framework for complex TCP servers which generally require a large amount of boilerplate code or custom test functions. This module provides a fluent, easy to use and incredibly powerful framework on which extremely complex protocols can be tested.\r\n\r\n## Example\r\nAll these things start out with an example of how you can use the test framework. The following is an example of using *node-conversation* with *Mocha*.\r\n\r\n```js\r\nvar Conversation = require('conversation');\r\n\r\ndescribe('protocol', function() {\r\n\tit('should forward messages to the correct user', function(done) {\r\n\t\tnew Conversation({ port: 9119 })\r\n\t\t\t.client('u1').u1.sendAnd('LOGIN:user1;').expect('OK;')\r\n\t\t\t.client('u2').u2.sendAnd('LOGIN:user2;').expect('OK;')\r\n\t\t\t.client('u3').u3.sendAnd('LOGIN:user3;').expect('OK;')\r\n\r\n\t\t\t.u1.writeAnd('CHAT:user2:hello;').expect('SENT:1;')\r\n\t\t\t.u2.expect('MESSAGE:user1:hello;')\r\n\t\t\t.u1.read('RECEIVED:1;')\r\n\r\n\t\t\t.u2.writeAnd('CHAT:user3:hi;').read('SENT:2;')\r\n\t\t\t.u3.read('MESSAGE:user2:hi;')\r\n\t\t\t.u2.read('RECEIVED:2;')\r\n\r\n\t\t\t.run(done);\r\n\t});\r\n});\r\n```\r\n\r\n## Extensibility\r\nDue to its design, it is extremely easy to automate common testing tasks (for example, login processes) by adding to the `Conversation.prototype` or `Conversations.Client.prototype`. This can help make testing systems which require setup tasks to be performed considerably easier.","readmeFilename":"README.md","bugs":{"url":"https://github.com/SierraSoftworks/node-conversation/issues"},"_id":"sierra-conversation@1.3.1","dist":{"shasum":"f4cc25efd404dd7af57a33eb0ba0ee12965c988b","tarball":"https://registry.npmjs.org/sierra-conversation/-/sierra-conversation-1.3.1.tgz","integrity":"sha512-TLrCmgBVW4/hckc/8TA7WEuHs8z/W0QyBKiekuZQyKl02XdCSY9Kf3Z81fjSlVoUaC9fTmTPlHkfiIG9TepKDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF/n/QWDYo0HCV5G3jKHyqhuT/Dv7UyRmWwwb//tW3MRAiApl8umZcfJMTFcr1L4NtLz7J9HhVeo053fQsJxXSva5g=="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"spartan563","email":"benjamin.pannell@gmail.com"},"maintainers":[{"name":"spartan563","email":"benjamin.pannell@gmail.com"}],"directories":{}},"1.3.2":{"author":{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"},"name":"sierra-conversation","description":"Node module which provides fluent testing of complex TCP servers and protocols.","keywords":["fluent","tcp","testing","server","protocol"],"version":"1.3.2","license":"MIT","repository":{"url":"http://github.com/SierraSoftworks/node-conversation"},"contributors":[{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"}],"scripts":{"test":"node test/run"},"main":"./lib/Conversation","engines":{"node":"*"},"analyse":false,"dependencies":{"lodash":"*","should":"*"},"readme":"# Conversations\r\nThis module is designed to provide developers with an extremely powerful testing framework for complex TCP servers which generally require a large amount of boilerplate code or custom test functions. This module provides a fluent, easy to use and incredibly powerful framework on which extremely complex protocols can be tested.\r\n\r\n## Example\r\nAll these things start out with an example of how you can use the test framework. The following is an example of using *node-conversation* with *Mocha*.\r\n\r\n```js\r\nvar Conversation = require('conversation');\r\n\r\ndescribe('protocol', function() {\r\n\tit('should forward messages to the correct user', function(done) {\r\n\t\tnew Conversation({ port: 9119 })\r\n\t\t\t.client('u1').u1.sendAnd('LOGIN:user1;').expect('OK;')\r\n\t\t\t.client('u2').u2.sendAnd('LOGIN:user2;').expect('OK;')\r\n\t\t\t.client('u3').u3.sendAnd('LOGIN:user3;').expect('OK;')\r\n\r\n\t\t\t.u1.writeAnd('CHAT:user2:hello;').expect('SENT:1;')\r\n\t\t\t.u2.expect('MESSAGE:user1:hello;')\r\n\t\t\t.u1.read('RECEIVED:1;')\r\n\r\n\t\t\t.u2.writeAnd('CHAT:user3:hi;').read('SENT:2;')\r\n\t\t\t.u3.read('MESSAGE:user2:hi;')\r\n\t\t\t.u2.read('RECEIVED:2;')\r\n\r\n\t\t\t.run(done);\r\n\t});\r\n});\r\n```\r\n\r\n## Extensibility\r\nDue to its design, it is extremely easy to automate common testing tasks (for example, login processes) by adding to the `Conversation.prototype` or `Conversations.Client.prototype`. This can help make testing systems which require setup tasks to be performed considerably easier.","readmeFilename":"README.md","bugs":{"url":"https://github.com/SierraSoftworks/node-conversation/issues"},"_id":"sierra-conversation@1.3.2","dist":{"shasum":"2ddbb945caef80f26b8d00a442367a9be240f9cd","tarball":"https://registry.npmjs.org/sierra-conversation/-/sierra-conversation-1.3.2.tgz","integrity":"sha512-ZRwcvFBsUgfAutmn/5RY9fo7urzpo3bTI6ksdNngU5GFxS4mpmwXMviLzkYRJXiiF1RqHoYGYNgwWQXrvrpHfQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcP313e/UZdYt58JuvMmI8XNlly+wjOZfLUnaAjYJLDQIhANWU5DNatmH1UXiK9sgLjLCS5BTSff/aw93X0vKDx7C0"}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"spartan563","email":"benjamin.pannell@gmail.com"},"maintainers":[{"name":"spartan563","email":"benjamin.pannell@gmail.com"}],"directories":{}},"1.3.3":{"author":{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"},"name":"sierra-conversation","description":"Node module which provides fluent testing of complex TCP servers and protocols.","keywords":["fluent","tcp","testing","server","protocol"],"version":"1.3.3","license":"MIT","repository":{"url":"http://github.com/SierraSoftworks/node-conversation"},"contributors":[{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"}],"scripts":{"test":"node test/run"},"main":"./lib/Conversation","engines":{"node":"*"},"analyse":false,"dependencies":{"lodash":"*","should":"*"},"readme":"# Conversations\r\nThis module is designed to provide developers with an extremely powerful testing framework for complex TCP servers which generally require a large amount of boilerplate code or custom test functions. This module provides a fluent, easy to use and incredibly powerful framework on which extremely complex protocols can be tested.\r\n\r\n## Example\r\nAll these things start out with an example of how you can use the test framework. The following is an example of using *node-conversation* with *Mocha*.\r\n\r\n```js\r\nvar Conversation = require('conversation');\r\n\r\ndescribe('protocol', function() {\r\n\tit('should forward messages to the correct user', function(done) {\r\n\t\tnew Conversation({ port: 9119 })\r\n\t\t\t.client('u1').u1.sendAnd('LOGIN:user1;').expect('OK;')\r\n\t\t\t.client('u2').u2.sendAnd('LOGIN:user2;').expect('OK;')\r\n\t\t\t.client('u3').u3.sendAnd('LOGIN:user3;').expect('OK;')\r\n\r\n\t\t\t.u1.writeAnd('CHAT:user2:hello;').expect('SENT:1;')\r\n\t\t\t.u2.expect('MESSAGE:user1:hello;')\r\n\t\t\t.u1.read('RECEIVED:1;')\r\n\r\n\t\t\t.u2.writeAnd('CHAT:user3:hi;').read('SENT:2;')\r\n\t\t\t.u3.read('MESSAGE:user2:hi;')\r\n\t\t\t.u2.read('RECEIVED:2;')\r\n\r\n\t\t\t.run(done);\r\n\t});\r\n});\r\n```\r\n\r\n## Extensibility\r\nDue to its design, it is extremely easy to automate common testing tasks (for example, login processes) by adding to the `Conversation.prototype` or `Conversations.Client.prototype`. This can help make testing systems which require setup tasks to be performed considerably easier.","readmeFilename":"README.md","bugs":{"url":"https://github.com/SierraSoftworks/node-conversation/issues"},"_id":"sierra-conversation@1.3.3","dist":{"shasum":"22bb6337d92829a92ad7517c440cbff0e0c4664e","tarball":"https://registry.npmjs.org/sierra-conversation/-/sierra-conversation-1.3.3.tgz","integrity":"sha512-0D9jeOwah/b4zb7A+y9ePA0U8Oe4E8gBokOkr9gOAky6agO9CjBiB3CV1mmb+RNGjOiQkv4iGoSKiGoflu2dBg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdPzDO6Efmxpvp1f8KzY1v3OSQpLKE2lotttgDc3kGjgIgVqGzLQnqaxfJ6/tSuaAZUnB75oguzpjCdaxS7W64Wvg="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"spartan563","email":"benjamin.pannell@gmail.com"},"maintainers":[{"name":"spartan563","email":"benjamin.pannell@gmail.com"}]},"1.3.4":{"author":{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"},"name":"sierra-conversation","description":"Node module which provides fluent testing of complex TCP servers and protocols.","keywords":["fluent","tcp","testing","server","protocol"],"version":"1.3.4","license":"MIT","repository":{"url":"http://github.com/SierraSoftworks/node-conversation"},"contributors":[{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"}],"scripts":{"test":"node test/run"},"main":"./lib/Conversation","engines":{"node":"*"},"analyse":false,"dependencies":{"lodash":"*","should":"*"},"readme":"# Conversations\r\nThis module is designed to provide developers with an extremely powerful testing framework for complex TCP servers which generally require a large amount of boilerplate code or custom test functions. This module provides a fluent, easy to use and incredibly powerful framework on which extremely complex protocols can be tested.\r\n\r\n## Example\r\nAll these things start out with an example of how you can use the test framework. The following is an example of using *node-conversation* with *Mocha*.\r\n\r\n```js\r\nvar Conversation = require('conversation');\r\n\r\ndescribe('protocol', function() {\r\n\tit('should forward messages to the correct user', function(done) {\r\n\t\tnew Conversation({ port: 9119 })\r\n\t\t\t.client('u1').u1.sendAnd('LOGIN:user1;').expect('OK;')\r\n\t\t\t.client('u2').u2.sendAnd('LOGIN:user2;').expect('OK;')\r\n\t\t\t.client('u3').u3.sendAnd('LOGIN:user3;').expect('OK;')\r\n\r\n\t\t\t.u1.writeAnd('CHAT:user2:hello;').expect('SENT:1;')\r\n\t\t\t.u2.expect('MESSAGE:user1:hello;')\r\n\t\t\t.u1.read('RECEIVED:1;')\r\n\r\n\t\t\t.u2.writeAnd('CHAT:user3:hi;').read('SENT:2;')\r\n\t\t\t.u3.read('MESSAGE:user2:hi;')\r\n\t\t\t.u2.read('RECEIVED:2;')\r\n\r\n\t\t\t.run(done);\r\n\t});\r\n});\r\n```\r\n\r\n## Extensibility\r\nDue to its design, it is extremely easy to automate common testing tasks (for example, login processes) by adding to the `Conversation.prototype` or `Conversations.Client.prototype`. This can help make testing systems which require setup tasks to be performed considerably easier.","readmeFilename":"README.md","bugs":{"url":"https://github.com/SierraSoftworks/node-conversation/issues"},"_id":"sierra-conversation@1.3.4","dist":{"shasum":"cd05c305f1e5703667932b4d7dfc05e302253929","tarball":"https://registry.npmjs.org/sierra-conversation/-/sierra-conversation-1.3.4.tgz","integrity":"sha512-vCaJNAks52fc46NRwFjm7XtxndEupq7LWER3vyvF7w8EF949pcv5ipLHKPZ6s4fia1ycHsdBHPEvEglcNDUW0A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkSHuJSbdGqfyDz8eO9ajQRikhSPqGwLlWKNlIp3yWSwIgAQDQtTpfyfI5j0BAZqF0hPQ73DlF03uxK+XJQig7RoE="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"spartan563","email":"benjamin.pannell@gmail.com"},"maintainers":[{"name":"spartan563","email":"benjamin.pannell@gmail.com"}]},"1.3.5":{"author":{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"},"name":"sierra-conversation","description":"Node module which provides fluent testing of complex TCP servers and protocols.","keywords":["fluent","tcp","testing","server","protocol"],"version":"1.3.5","license":"MIT","repository":{"url":"http://github.com/SierraSoftworks/node-conversation"},"contributors":[{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"}],"scripts":{"test":"node test/run"},"main":"./lib/Conversation","engines":{"node":"*"},"analyse":false,"dependencies":{"lodash":"*","should":"*"},"readme":"# Conversations\r\nThis module is designed to provide developers with an extremely powerful testing framework for complex TCP servers which generally require a large amount of boilerplate code or custom test functions. This module provides a fluent, easy to use and incredibly powerful framework on which extremely complex protocols can be tested.\r\n\r\n## Example\r\nAll these things start out with an example of how you can use the test framework. The following is an example of using *node-conversation* with *Mocha*.\r\n\r\n```js\r\nvar Conversation = require('conversation');\r\n\r\ndescribe('protocol', function() {\r\n\tit('should forward messages to the correct user', function(done) {\r\n\t\tnew Conversation({ port: 9119 })\r\n\t\t\t.client('u1').u1.sendAnd('LOGIN:user1;').expect('OK;')\r\n\t\t\t.client('u2').u2.sendAnd('LOGIN:user2;').expect('OK;')\r\n\t\t\t.client('u3').u3.sendAnd('LOGIN:user3;').expect('OK;')\r\n\r\n\t\t\t.u1.writeAnd('CHAT:user2:hello;').expect('SENT:1;')\r\n\t\t\t.u2.expect('MESSAGE:user1:hello;')\r\n\t\t\t.u1.read('RECEIVED:1;')\r\n\r\n\t\t\t.u2.writeAnd('CHAT:user3:hi;').read('SENT:2;')\r\n\t\t\t.u3.read('MESSAGE:user2:hi;')\r\n\t\t\t.u2.read('RECEIVED:2;')\r\n\r\n\t\t\t.run(done);\r\n\t});\r\n});\r\n```\r\n\r\n## Extensibility\r\nDue to its design, it is extremely easy to automate common testing tasks (for example, login processes) by adding to the `Conversation.prototype` or `Conversations.Client.prototype`. This can help make testing systems which require setup tasks to be performed considerably easier.","readmeFilename":"README.md","bugs":{"url":"https://github.com/SierraSoftworks/node-conversation/issues"},"_id":"sierra-conversation@1.3.5","dist":{"shasum":"58a6a210281155ded2a3a2cb07773250642ad545","tarball":"https://registry.npmjs.org/sierra-conversation/-/sierra-conversation-1.3.5.tgz","integrity":"sha512-HMduEbG5DiZNaVICX6N/8Gr2FtSa/OmLP4YOyHFKPLkSOacuRpanQv+zDt+SjgJKu6FMTqnK3lWiAfIwLOQ45A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEWtUOEtAh/lwfb7DZVwEkgdU1m1cy89cFu4KF2EF65hAiEAm7LKQPVv54nqhe075RWhtslEiFtdlRN9bVD5FuEwbDU="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"spartan563","email":"benjamin.pannell@gmail.com"},"maintainers":[{"name":"spartan563","email":"benjamin.pannell@gmail.com"}]},"1.4.0":{"author":{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"},"name":"sierra-conversation","description":"Node module which provides fluent testing of complex TCP servers and protocols.","keywords":["fluent","tcp","testing","server","protocol"],"version":"1.4.0","license":"MIT","repository":{"url":"http://github.com/SierraSoftworks/node-conversation"},"contributors":[{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"}],"scripts":{"test":"node test/run"},"main":"./lib/Conversation","engines":{"node":"*"},"analyse":false,"dependencies":{"lodash":"*","should":"*"},"readme":"# Conversations\r\nThis module is designed to provide developers with an extremely powerful testing framework for complex TCP servers which generally require a large amount of boilerplate code or custom test functions. This module provides a fluent, easy to use and incredibly powerful framework on which extremely complex protocols can be tested.\r\n\r\n## Example\r\nAll these things start out with an example of how you can use the test framework. The following is an example of using *node-conversation* with *Mocha*.\r\n\r\n```js\r\nvar Conversation = require('conversation');\r\n\r\ndescribe('protocol', function() {\r\n\tit('should forward messages to the correct user', function(done) {\r\n\t\tnew Conversation({ port: 9119 })\r\n\t\t\t.client('u1').u1.send('LOGIN:user1;').and.expect('OK;')\r\n\t\t\t.client('u2').u2.send('LOGIN:user2;').and.expect('OK;')\r\n\t\t\t.client('u3').u3.send('LOGIN:user3;').and.expect('OK;')\r\n\r\n\t\t\t.u1.write('CHAT:user2:hello;').and.expect('SENT:1;')\r\n\t\t\t.u2.expect('MESSAGE:user1:hello;')\r\n\t\t\t.u1.read('RECEIVED:1;')\r\n\r\n\t\t\t.u2.write('CHAT:user3:hi;').and.read('SENT:2;')\r\n\t\t\t.u3.read('MESSAGE:user2:hi;')\r\n\t\t\t.u2.read('RECEIVED:2;')\r\n\r\n\t\t\t.run(done);\r\n\t});\r\n});\r\n```\r\n\r\n## Extensibility\r\nDue to its design, it is extremely easy to automate common testing tasks (for example, login processes) by adding to the `Conversation.prototype` or `Conversations.Client.prototype`. This can help make testing systems which require setup tasks to be performed considerably easier.\r\n\r\n## API\r\n### Conversation\r\nThe conversation object provides the following API methods through which you can interact with a remote server.\r\n\r\n```js\r\nConversation(options) {\t\r\n\t/// <summary>Creates a new Conversation object which tests a protocol sequentially</summary>\r\n\t/// <param name=\"options\" type=\"Object\">Options dictating how the Conversation is handled</param>\r\n\r\n\toptions = {\r\n\t\tport: Number,\r\n\t\tinitializer: function(socket) { }\r\n\t}\r\n}\r\n\r\nConversation.prototype.client = function(id, initializer) {\t\r\n\t/// <signature>\r\n\t/// <summary>Adds a new client to the Conversation, using the Conversation's initializer or port number</summary>\r\n\t/// <param name=\"id\" type=\"String\">A unique client identifier used to indicate which client to use when sending a message</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Adds a new client to the Conversation</summary>\r\n\t/// <param name=\"id\" type=\"String\">A unique client identifier used to indicate which client to use when sending a message</param>\r\n\t/// <param name=\"initializer\" type=\"Number\">The port to which the client should connect</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Adds a new client to the Conversation</summary>\r\n\t/// <param name=\"id\" type=\"String\">A unique client identifier used to indicate which client to use when sending a message</param>\r\n\t/// <param name=\"initializer\" type=\"Function\">A function to be called once the client is connected, allowing for any setup</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n};\r\n\r\nConversation.prototype.write = Conversation.prototype.send = function (id, message) {\r\n\t/// <signature>\r\n\t/// <summary>Queues a write operation in sequence by the default client ID</summary>\r\n\t/// <param name=\"message\" type=\"String\">The data packet to send from the client</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Queues a write operation in sequence by the given client ID</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client from whom the packet will be sent</param>\r\n\t/// <param name=\"message\" type=\"String\">The data packet to send from the client</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n};\r\n\r\nConversation.prototype.expect = Conversation.prototype.read = function (id, message) {\r\n\t/// <signature>\r\n\t/// <summary>Queues a receive operation in sequence to the default client</summary>\r\n\t/// <param name=\"message\" type=\"String\">The packet that the client expects to receive</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Queues a receive operation in sequence to the default client</summary>\r\n\t/// <param name=\"message\" type=\"Regex\">A regex which will validate the packet received by the client</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Queues a receive operation in sequence to the given client ID</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client to whom the message should be sent</param>\r\n\t/// <param name=\"message\" type=\"String\">The packet that the client expects to receive</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Queues a receive operation in sequence to the given client ID</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client to whom the message should be sent</param>\r\n\t/// <param name=\"message\" type=\"Regex\">A regex which will validate the packet received by the client</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n};\r\n\r\n\r\nConversation.prototype.wait = function (time) {\r\n\t/// <summary>Waits for the specified interval before continuing the Conversation</summary>\r\n\t/// <param name=\"time\" type=\"Number\">The amount of time to wait in milliseconds</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.drop = function(id, count) {\r\n\t/// <signature>\r\n\t/// <summary>Drops any pending messages from the receive buffer for the specified client</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client who's receive buffer should be cleared</param>\r\n\t/// </signature>\t\r\n\t/// <signature>\r\n\t/// <summary>Drops the specified number of pending messages from the receive buffer for the specified client</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client who's receive buffer should be cleared</param>\r\n\t/// <param name=\"count\" type=\"Number\">The number of messages to drop from the receive buffer, starting at the front</param>\r\n\t/// </signature>\r\n};\r\n\r\n\r\nConversation.prototype.call = Conversation.prototype.then = function (callback) {\r\n\t/// <summary>Queues a call to the given function when the relevant point in the Conversation is reached</summary>\r\n\t/// <param name=\"callback\" type=\"Function\">The function to call</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.disconnect = Conversation.prototype.end = function(id) {\r\n\t/// <summary>Queues a disconnection event for the specified client</summary>\r\n\t/// <param name=\"id\">The ID of the client who should disconnect</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.succeded = function(callback) {\r\n\t/// <summary>Runs the given callback if no error occurs</summary>\r\n\t/// <param name=\"callback\">A function to be called once the conversation completes</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.failed = function(callback) {\r\n\t/// <summary>Runs the given callback if an error occurs</summary>\r\n\t/// <param name=\"callback\">A function to be called to handle the error</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.finished = Conversation.prototype.done = function(callback) {\r\n\t/// <summary>Runs the given callback when the conversation finishes</summary>\r\n\t/// <param name=\"callback\">A function to be called once the conversation completes</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.run = function (done) {\r\n\t/// <signature>\r\n\t/// <summary>Runs the prepared Conversation</summary>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Runs the prepared Conversation, calling the given callback once complete</summary>\r\n\t/// <param name=\"done\" type=\"Function\">A function to be called once the Conversation has been completed</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n};\r\n\r\nConversation.prototype.preSend = function (callback) {\r\n\t/// <summary>Registers a hook to preprocess data prior to it being sent</summary>\r\n\t/// <param name=\"callback\" type=\"Function\">A function which preprocesses the data</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.preReceive = function (callback) {\r\n\t/// <summary>Registers a hook to preprocess data prior to it being processed</summary>\r\n\t/// <param name=\"callback\" type=\"Function\">A function which preprocesses the data</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\n\r\nConversation.prototype.preOperation = function (callback) {\r\n\t/// <summary>Registers a hook to preprocess an operation prior to it being dispatched</summary>\r\n\t/// <param name=\"callback\" type=\"Function\">A function which preprocesses the operation</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n```","readmeFilename":"README.md","bugs":{"url":"https://github.com/SierraSoftworks/node-conversation/issues"},"_id":"sierra-conversation@1.4.0","dist":{"shasum":"181dc51b2e810fd2da889bb6f68fe3941db5b721","tarball":"https://registry.npmjs.org/sierra-conversation/-/sierra-conversation-1.4.0.tgz","integrity":"sha512-p4+oL9DCv9yvM3Yu2rSIRdOF2WEdNiZsjzPLKCHjpboSf0lae3HXaBIaArAN1duy9d+aEMOMqrwAorwnTtafcw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDHiyXRvHy+f5+RNa7q4Litib1zCdUW+R1jqx7RiM5irAiEA8NRXLyB57xpn6wRYVQ+dd4iPINwSGtifacEChp1R6LE="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"spartan563","email":"benjamin.pannell@gmail.com"},"maintainers":[{"name":"spartan563","email":"benjamin.pannell@gmail.com"}]},"1.4.1":{"author":{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"},"name":"sierra-conversation","description":"Node module which provides fluent testing of complex TCP servers and protocols.","keywords":["fluent","tcp","testing","server","protocol"],"version":"1.4.1","license":"MIT","repository":{"url":"http://github.com/SierraSoftworks/node-conversation"},"contributors":[{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"}],"scripts":{"test":"node test/run"},"main":"./lib/Conversation","engines":{"node":"*"},"analyse":false,"dependencies":{"lodash":"*","should":"*"},"readme":"# Conversations\r\nThis module is designed to provide developers with an extremely powerful testing framework for complex TCP servers which generally require a large amount of boilerplate code or custom test functions. This module provides a fluent, easy to use and incredibly powerful framework on which extremely complex protocols can be tested.\r\n\r\n## Example\r\nAll these things start out with an example of how you can use the test framework. The following is an example of using *node-conversation* with *Mocha*.\r\n\r\n```js\r\nvar Conversation = require('conversation');\r\n\r\ndescribe('protocol', function() {\r\n\tit('should forward messages to the correct user', function(done) {\r\n\t\tnew Conversation({ port: 9119 })\r\n\t\t\t.client('u1').u1.send('LOGIN:user1;').and.expect('OK;')\r\n\t\t\t.client('u2').u2.send('LOGIN:user2;').and.expect('OK;')\r\n\t\t\t.client('u3').u3.send('LOGIN:user3;').and.expect('OK;')\r\n\r\n\t\t\t.u1.write('CHAT:user2:hello;').and.expect('SENT:1;')\r\n\t\t\t.u2.expect('MESSAGE:user1:hello;')\r\n\t\t\t.u1.read('RECEIVED:1;')\r\n\r\n\t\t\t.u2.write('CHAT:user3:hi;').and.read('SENT:2;')\r\n\t\t\t.u3.read('MESSAGE:user2:hi;')\r\n\t\t\t.u2.read('RECEIVED:2;')\r\n\r\n\t\t\t.run(done);\r\n\t});\r\n});\r\n```\r\n\r\n## Extensibility\r\nDue to its design, it is extremely easy to automate common testing tasks (for example, login processes) by adding to the `Conversation.prototype` or `Conversations.Client.prototype`. This can help make testing systems which require setup tasks to be performed considerably easier.\r\n\r\n## API\r\n### Conversation\r\nThe conversation object provides the following API methods through which you can interact with a remote server.\r\n\r\n```js\r\nConversation(options) {\t\r\n\t/// <summary>Creates a new Conversation object which tests a protocol sequentially</summary>\r\n\t/// <param name=\"options\" type=\"Object\">Options dictating how the Conversation is handled</param>\r\n\r\n\toptions = {\r\n\t\tport: Number,\r\n\t\tinitializer: function(socket) { }\r\n\t}\r\n}\r\n\r\nConversation.prototype.client = function(id, initializer) {\t\r\n\t/// <signature>\r\n\t/// <summary>Adds a new client to the Conversation, using the Conversation's initializer or port number</summary>\r\n\t/// <param name=\"id\" type=\"String\">A unique client identifier used to indicate which client to use when sending a message</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Adds a new client to the Conversation</summary>\r\n\t/// <param name=\"id\" type=\"String\">A unique client identifier used to indicate which client to use when sending a message</param>\r\n\t/// <param name=\"initializer\" type=\"Number\">The port to which the client should connect</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Adds a new client to the Conversation</summary>\r\n\t/// <param name=\"id\" type=\"String\">A unique client identifier used to indicate which client to use when sending a message</param>\r\n\t/// <param name=\"initializer\" type=\"Function\">A function to be called once the client is connected, allowing for any setup</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n};\r\n\r\nConversation.prototype.write = Conversation.prototype.send = function (id, message) {\r\n\t/// <signature>\r\n\t/// <summary>Queues a write operation in sequence by the default client ID</summary>\r\n\t/// <param name=\"message\" type=\"String\">The data packet to send from the client</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Queues a write operation in sequence by the given client ID</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client from whom the packet will be sent</param>\r\n\t/// <param name=\"message\" type=\"String\">The data packet to send from the client</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n};\r\n\r\nConversation.prototype.expect = Conversation.prototype.read = function (id, message) {\r\n\t/// <signature>\r\n\t/// <summary>Queues a receive operation in sequence to the default client</summary>\r\n\t/// <param name=\"message\" type=\"String\">The packet that the client expects to receive</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Queues a receive operation in sequence to the default client</summary>\r\n\t/// <param name=\"message\" type=\"Regex\">A regex which will validate the packet received by the client</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Queues a receive operation in sequence to the given client ID</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client to whom the message should be sent</param>\r\n\t/// <param name=\"message\" type=\"String\">The packet that the client expects to receive</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Queues a receive operation in sequence to the given client ID</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client to whom the message should be sent</param>\r\n\t/// <param name=\"message\" type=\"Regex\">A regex which will validate the packet received by the client</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n};\r\n\r\n\r\nConversation.prototype.wait = function (time) {\r\n\t/// <summary>Waits for the specified interval before continuing the Conversation</summary>\r\n\t/// <param name=\"time\" type=\"Number\">The amount of time to wait in milliseconds</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.drop = function(id, count) {\r\n\t/// <signature>\r\n\t/// <summary>Drops any pending messages from the receive buffer for the specified client</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client who's receive buffer should be cleared</param>\r\n\t/// </signature>\t\r\n\t/// <signature>\r\n\t/// <summary>Drops the specified number of pending messages from the receive buffer for the specified client</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client who's receive buffer should be cleared</param>\r\n\t/// <param name=\"count\" type=\"Number\">The number of messages to drop from the receive buffer, starting at the front</param>\r\n\t/// </signature>\r\n};\r\n\r\n\r\nConversation.prototype.call = Conversation.prototype.then = function (callback) {\r\n\t/// <summary>Queues a call to the given function when the relevant point in the Conversation is reached</summary>\r\n\t/// <param name=\"callback\" type=\"Function\">The function to call</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.disconnect = Conversation.prototype.end = function(id) {\r\n\t/// <summary>Queues a disconnection event for the specified client</summary>\r\n\t/// <param name=\"id\">The ID of the client who should disconnect</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.succeded = function(callback) {\r\n\t/// <summary>Runs the given callback if no error occurs</summary>\r\n\t/// <param name=\"callback\">A function to be called once the conversation completes</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.failed = function(callback) {\r\n\t/// <summary>Runs the given callback if an error occurs</summary>\r\n\t/// <param name=\"callback\">A function to be called to handle the error</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.finished = Conversation.prototype.done = function(callback) {\r\n\t/// <summary>Runs the given callback when the conversation finishes</summary>\r\n\t/// <param name=\"callback\">A function to be called once the conversation completes</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.run = function (done) {\r\n\t/// <signature>\r\n\t/// <summary>Runs the prepared Conversation</summary>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Runs the prepared Conversation, calling the given callback once complete</summary>\r\n\t/// <param name=\"done\" type=\"Function\">A function to be called once the Conversation has been completed</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n};\r\n\r\nConversation.prototype.preSend = function (callback) {\r\n\t/// <summary>Registers a hook to preprocess data prior to it being sent</summary>\r\n\t/// <param name=\"callback\" type=\"Function\">A function which preprocesses the data</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.preReceive = function (callback) {\r\n\t/// <summary>Registers a hook to preprocess data prior to it being processed</summary>\r\n\t/// <param name=\"callback\" type=\"Function\">A function which preprocesses the data</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\n\r\nConversation.prototype.preOperation = function (callback) {\r\n\t/// <summary>Registers a hook to preprocess an operation prior to it being dispatched</summary>\r\n\t/// <param name=\"callback\" type=\"Function\">A function which preprocesses the operation</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n```","readmeFilename":"README.md","bugs":{"url":"https://github.com/SierraSoftworks/node-conversation/issues"},"_id":"sierra-conversation@1.4.1","dist":{"shasum":"0b7d72786d021de928e3d00f6bc4522016e2d9a3","tarball":"https://registry.npmjs.org/sierra-conversation/-/sierra-conversation-1.4.1.tgz","integrity":"sha512-0NbfBVSq3u+aq7ZUfQ5LiiEnyZewQVj7/poOzDoQugj3U0AuZaKcg+v6JyiE5shdojV3tnnebmhuAmIHmscDdA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6y3sfMRV8kjRo/q2YJSYSuI5zEaEh4f082lZiHevVjwIgIaKoVvaIjsmj69S8p/lazuSAX/1wrSo24TS1Nus0nD4="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"spartan563","email":"benjamin.pannell@gmail.com"},"maintainers":[{"name":"spartan563","email":"benjamin.pannell@gmail.com"}]},"1.5.0":{"author":{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"},"name":"sierra-conversation","description":"Node module which provides fluent testing of complex TCP servers and protocols.","keywords":["fluent","tcp","testing","server","protocol"],"version":"1.5.0","license":"MIT","repository":{"url":"http://github.com/SierraSoftworks/node-conversation"},"contributors":[{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"}],"scripts":{"test":"node test/run"},"main":"./lib/Conversation","engines":{"node":"*"},"analyse":false,"dependencies":{"lodash":"*","should":"*"},"readme":"# Conversations\r\nThis module is designed to provide developers with an extremely powerful testing framework for complex TCP servers which generally require a large amount of boilerplate code or custom test functions. This module provides a fluent, easy to use and incredibly powerful framework on which extremely complex protocols can be tested.\r\n\r\n## Example\r\nAll these things start out with an example of how you can use the test framework. The following is an example of using *node-conversation* with *Mocha*.\r\n\r\n```js\r\nvar Conversation = require('conversation');\r\n\r\ndescribe('protocol', function() {\r\n\tit('should forward messages to the correct user', function(done) {\r\n\t\tnew Conversation({ port: 9119 })\r\n\t\t\t.client('u1').u1.send('LOGIN:user1;').and.expect('OK;')\r\n\t\t\t.client('u2').u2.send('LOGIN:user2;').and.expect('OK;')\r\n\t\t\t.client('u3').u3.send('LOGIN:user3;').and.expect('OK;')\r\n\r\n\t\t\t.u1.write('CHAT:user2:hello;').and.expect('SENT:1;')\r\n\t\t\t.u2.expect('MESSAGE:user1:hello;')\r\n\t\t\t.u1.read('RECEIVED:1;')\r\n\r\n\t\t\t.u2.write('CHAT:user3:hi;').and.read('SENT:2;')\r\n\t\t\t.u3.read('MESSAGE:user2:hi;')\r\n\t\t\t.u2.read('RECEIVED:2;')\r\n\r\n\t\t\t.u1.send('LOGOUT;')\r\n\t\t\t.all.expect('LOGOUT:user1;')\r\n\r\n\t\t\t.run(done);\r\n\t});\r\n});\r\n```\r\n\r\n## Extensibility\r\nDue to its design, it is extremely easy to automate common testing tasks (for example, login processes) by adding to the `Conversation.prototype` or `Conversations.Client.prototype`. This can help make testing systems which require setup tasks to be performed considerably easier.\r\n\r\n## API\r\n### Conversation\r\nThe conversation object provides the following API methods through which you can interact with a remote server.\r\n\r\n```js\r\nConversation(options) {\t\r\n\t/// <summary>Creates a new Conversation object which tests a protocol sequentially</summary>\r\n\t/// <param name=\"options\" type=\"Object\">Options dictating how the Conversation is handled</param>\r\n\r\n\toptions = {\r\n\t\tport: Number,\r\n\t\tinitializer: function(socket) { }\r\n\t}\r\n}\r\n\r\nConversation.prototype.client = function(id, initializer) {\t\r\n\t/// <signature>\r\n\t/// <summary>Adds a new client to the Conversation, using the Conversation's initializer or port number</summary>\r\n\t/// <param name=\"id\" type=\"String\">A unique client identifier used to indicate which client to use when sending a message</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Adds a new client to the Conversation</summary>\r\n\t/// <param name=\"id\" type=\"String\">A unique client identifier used to indicate which client to use when sending a message</param>\r\n\t/// <param name=\"initializer\" type=\"Number\">The port to which the client should connect</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Adds a new client to the Conversation</summary>\r\n\t/// <param name=\"id\" type=\"String\">A unique client identifier used to indicate which client to use when sending a message</param>\r\n\t/// <param name=\"initializer\" type=\"Function\">A function to be called once the client is connected, allowing for any setup</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n};\r\n\r\nConversation.prototype.write = Conversation.prototype.send = function (id, message) {\r\n\t/// <signature>\r\n\t/// <summary>Queues a write operation in sequence by the default client ID</summary>\r\n\t/// <param name=\"message\" type=\"String\">The data packet to send from the client</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Queues a write operation in sequence by the given client ID</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client from whom the packet will be sent</param>\r\n\t/// <param name=\"message\" type=\"String\">The data packet to send from the client</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n};\r\n\r\nConversation.prototype.expect = Conversation.prototype.read = function (id, message) {\r\n\t/// <signature>\r\n\t/// <summary>Queues a receive operation in sequence to the default client</summary>\r\n\t/// <param name=\"message\" type=\"String\">The packet that the client expects to receive</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Queues a receive operation in sequence to the default client</summary>\r\n\t/// <param name=\"message\" type=\"Regex\">A regex which will validate the packet received by the client</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Queues a receive operation in sequence to the given client ID</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client to whom the message should be sent</param>\r\n\t/// <param name=\"message\" type=\"String\">The packet that the client expects to receive</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Queues a receive operation in sequence to the given client ID</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client to whom the message should be sent</param>\r\n\t/// <param name=\"message\" type=\"Regex\">A regex which will validate the packet received by the client</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n};\r\n\r\n\r\nConversation.prototype.wait = function (time) {\r\n\t/// <summary>Waits for the specified interval before continuing the Conversation</summary>\r\n\t/// <param name=\"time\" type=\"Number\">The amount of time to wait in milliseconds</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.drop = function(id, count) {\r\n\t/// <signature>\r\n\t/// <summary>Drops any pending messages from the receive buffer for the specified client</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client who's receive buffer should be cleared</param>\r\n\t/// </signature>\t\r\n\t/// <signature>\r\n\t/// <summary>Drops the specified number of pending messages from the receive buffer for the specified client</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client who's receive buffer should be cleared</param>\r\n\t/// <param name=\"count\" type=\"Number\">The number of messages to drop from the receive buffer, starting at the front</param>\r\n\t/// </signature>\r\n};\r\n\r\n\r\nConversation.prototype.call = Conversation.prototype.then = function (callback) {\r\n\t/// <summary>Queues a call to the given function when the relevant point in the Conversation is reached</summary>\r\n\t/// <param name=\"callback\" type=\"Function\">The function to call</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.disconnect = Conversation.prototype.end = function(id) {\r\n\t/// <summary>Queues a disconnection event for the specified client</summary>\r\n\t/// <param name=\"id\">The ID of the client who should disconnect</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.succeded = function(callback) {\r\n\t/// <summary>Runs the given callback if no error occurs</summary>\r\n\t/// <param name=\"callback\">A function to be called once the conversation completes</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.failed = function(callback) {\r\n\t/// <summary>Runs the given callback if an error occurs</summary>\r\n\t/// <param name=\"callback\">A function to be called to handle the error</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.finished = Conversation.prototype.done = function(callback) {\r\n\t/// <summary>Runs the given callback when the conversation finishes</summary>\r\n\t/// <param name=\"callback\">A function to be called once the conversation completes</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.run = function (done) {\r\n\t/// <signature>\r\n\t/// <summary>Runs the prepared Conversation</summary>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Runs the prepared Conversation, calling the given callback once complete</summary>\r\n\t/// <param name=\"done\" type=\"Function\">A function to be called once the Conversation has been completed</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n};\r\n\r\nConversation.prototype.preSend = function (callback) {\r\n\t/// <summary>Registers a hook to preprocess data prior to it being sent</summary>\r\n\t/// <param name=\"callback\" type=\"Function\">A function which preprocesses the data</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.preReceive = function (callback) {\r\n\t/// <summary>Registers a hook to preprocess data prior to it being processed</summary>\r\n\t/// <param name=\"callback\" type=\"Function\">A function which preprocesses the data</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\n\r\nConversation.prototype.preOperation = function (callback) {\r\n\t/// <summary>Registers a hook to preprocess an operation prior to it being dispatched</summary>\r\n\t/// <param name=\"callback\" type=\"Function\">A function which preprocesses the operation</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n```","readmeFilename":"README.md","bugs":{"url":"https://github.com/SierraSoftworks/node-conversation/issues"},"_id":"sierra-conversation@1.5.0","dist":{"shasum":"5cf735706a73f382e3d4eed472f9f12a1b3a2672","tarball":"https://registry.npmjs.org/sierra-conversation/-/sierra-conversation-1.5.0.tgz","integrity":"sha512-NyyTWpog6/Ra7juJkGQbjax68WwFyxzcEDk2ExjZD+GjeSAqUTYEDMu5zn6SK6upjw1IG7TJtew++t/J7a74hw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID9AJxbiokPCNlHCyfrBHz0Zg9jjnfs0PaS/yteuoqtxAiEA3znkUKyGD3h+N2lkxP1f+1L9mjCyVa84kSH588miVBU="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"spartan563","email":"benjamin.pannell@gmail.com"},"maintainers":[{"name":"spartan563","email":"benjamin.pannell@gmail.com"}]},"1.5.1":{"author":{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"},"name":"sierra-conversation","description":"Node module which provides fluent testing of complex TCP servers and protocols.","keywords":["fluent","tcp","testing","server","protocol"],"version":"1.5.1","license":"MIT","repository":{"url":"http://github.com/SierraSoftworks/node-conversation"},"contributors":[{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"}],"scripts":{"test":"node test/run"},"main":"./lib/Conversation","engines":{"node":"*"},"analyse":false,"dependencies":{"lodash":"*","should":"*"},"readme":"# Conversations\r\nThis module is designed to provide developers with an extremely powerful testing framework for complex TCP servers which generally require a large amount of boilerplate code or custom test functions. This module provides a fluent, easy to use and incredibly powerful framework on which extremely complex protocols can be tested.\r\n\r\n## Example\r\nAll these things start out with an example of how you can use the test framework. The following is an example of using *node-conversation* with *Mocha*.\r\n\r\n```js\r\nvar Conversation = require('conversation');\r\n\r\ndescribe('protocol', function() {\r\n\tit('should forward messages to the correct user', function(done) {\r\n\t\tnew Conversation({ port: 9119 })\r\n\t\t\t.client('u1').u1.send('LOGIN:user1;').and.expect('OK;')\r\n\t\t\t.client('u2').u2.send('LOGIN:user2;').and.expect('OK;')\r\n\t\t\t.client('u3').u3.send('LOGIN:user3;').and.expect('OK;')\r\n\r\n\t\t\t.u1.write('CHAT:user2:hello;').and.expect('SENT:1;')\r\n\t\t\t.u2.expect('MESSAGE:user1:hello;')\r\n\t\t\t.u1.read('RECEIVED:1;')\r\n\r\n\t\t\t.u2.write('CHAT:user3:hi;').and.read('SENT:2;')\r\n\t\t\t.u3.read('MESSAGE:user2:hi;')\r\n\t\t\t.u2.read('RECEIVED:2;')\r\n\r\n\t\t\t.u1.send('LOGOUT;')\r\n\t\t\t.all.expect('LOGOUT:user1;')\r\n\r\n\t\t\t.run(done);\r\n\t});\r\n});\r\n```\r\n\r\n## Extensibility\r\nDue to its design, it is extremely easy to automate common testing tasks (for example, login processes) by adding to the `Conversation.prototype` or `Conversations.Client.prototype`. This can help make testing systems which require setup tasks to be performed considerably easier.\r\n\r\n## API\r\n### Conversation\r\nThe conversation object provides the following API methods through which you can interact with a remote server.\r\n\r\n```js\r\nConversation(options) {\t\r\n\t/// <summary>Creates a new Conversation object which tests a protocol sequentially</summary>\r\n\t/// <param name=\"options\" type=\"Object\">Options dictating how the Conversation is handled</param>\r\n\r\n\toptions = {\r\n\t\tport: Number,\r\n\t\tinitializer: function(socket) { }\r\n\t}\r\n}\r\n\r\nConversation.prototype.client = function(id, initializer) {\t\r\n\t/// <signature>\r\n\t/// <summary>Adds a new client to the Conversation, using the Conversation's initializer or port number</summary>\r\n\t/// <param name=\"id\" type=\"String\">A unique client identifier used to indicate which client to use when sending a message</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Adds a new client to the Conversation</summary>\r\n\t/// <param name=\"id\" type=\"String\">A unique client identifier used to indicate which client to use when sending a message</param>\r\n\t/// <param name=\"initializer\" type=\"Number\">The port to which the client should connect</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Adds a new client to the Conversation</summary>\r\n\t/// <param name=\"id\" type=\"String\">A unique client identifier used to indicate which client to use when sending a message</param>\r\n\t/// <param name=\"initializer\" type=\"Function\">A function to be called once the client is connected, allowing for any setup</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n};\r\n\r\nConversation.prototype.write = Conversation.prototype.send = function (id, message) {\r\n\t/// <signature>\r\n\t/// <summary>Queues a write operation in sequence by the default client ID</summary>\r\n\t/// <param name=\"message\" type=\"String\">The data packet to send from the client</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Queues a write operation in sequence by the given client ID</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client from whom the packet will be sent</param>\r\n\t/// <param name=\"message\" type=\"String\">The data packet to send from the client</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n};\r\n\r\nConversation.prototype.expect = Conversation.prototype.read = function (id, message) {\r\n\t/// <signature>\r\n\t/// <summary>Queues a receive operation in sequence to the default client</summary>\r\n\t/// <param name=\"message\" type=\"String\">The packet that the client expects to receive</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Queues a receive operation in sequence to the default client</summary>\r\n\t/// <param name=\"message\" type=\"Regex\">A regex which will validate the packet received by the client</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Queues a receive operation in sequence to the given client ID</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client to whom the message should be sent</param>\r\n\t/// <param name=\"message\" type=\"String\">The packet that the client expects to receive</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Queues a receive operation in sequence to the given client ID</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client to whom the message should be sent</param>\r\n\t/// <param name=\"message\" type=\"Regex\">A regex which will validate the packet received by the client</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n};\r\n\r\n\r\nConversation.prototype.wait = function (time) {\r\n\t/// <summary>Waits for the specified interval before continuing the Conversation</summary>\r\n\t/// <param name=\"time\" type=\"Number\">The amount of time to wait in milliseconds</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.drop = function(id, count) {\r\n\t/// <signature>\r\n\t/// <summary>Drops any pending messages from the receive buffer for the specified client</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client who's receive buffer should be cleared</param>\r\n\t/// </signature>\t\r\n\t/// <signature>\r\n\t/// <summary>Drops the specified number of pending messages from the receive buffer for the specified client</summary>\r\n\t/// <param name=\"id\" type=\"String\">The ID of the client who's receive buffer should be cleared</param>\r\n\t/// <param name=\"count\" type=\"Number\">The number of messages to drop from the receive buffer, starting at the front</param>\r\n\t/// </signature>\r\n};\r\n\r\n\r\nConversation.prototype.call = Conversation.prototype.then = function (callback) {\r\n\t/// <summary>Queues a call to the given function when the relevant point in the Conversation is reached</summary>\r\n\t/// <param name=\"callback\" type=\"Function\">The function to call</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.disconnect = Conversation.prototype.end = function(id) {\r\n\t/// <summary>Queues a disconnection event for the specified client</summary>\r\n\t/// <param name=\"id\">The ID of the client who should disconnect</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.succeded = function(callback) {\r\n\t/// <summary>Runs the given callback if no error occurs</summary>\r\n\t/// <param name=\"callback\">A function to be called once the conversation completes</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.failed = function(callback) {\r\n\t/// <summary>Runs the given callback if an error occurs</summary>\r\n\t/// <param name=\"callback\">A function to be called to handle the error</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.finished = Conversation.prototype.done = function(callback) {\r\n\t/// <summary>Runs the given callback when the conversation finishes</summary>\r\n\t/// <param name=\"callback\">A function to be called once the conversation completes</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.run = function (done) {\r\n\t/// <signature>\r\n\t/// <summary>Runs the prepared Conversation</summary>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n\t/// <signature>\r\n\t/// <summary>Runs the prepared Conversation, calling the given callback once complete</summary>\r\n\t/// <param name=\"done\" type=\"Function\">A function to be called once the Conversation has been completed</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n\t/// </signature>\r\n};\r\n\r\nConversation.prototype.preSend = function (callback) {\r\n\t/// <summary>Registers a hook to preprocess data prior to it being sent</summary>\r\n\t/// <param name=\"callback\" type=\"Function\">A function which preprocesses the data</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\nConversation.prototype.preReceive = function (callback) {\r\n\t/// <summary>Registers a hook to preprocess data prior to it being processed</summary>\r\n\t/// <param name=\"callback\" type=\"Function\">A function which preprocesses the data</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n\r\n\r\nConversation.prototype.preOperation = function (callback) {\r\n\t/// <summary>Registers a hook to preprocess an operation prior to it being dispatched</summary>\r\n\t/// <param name=\"callback\" type=\"Function\">A function which preprocesses the operation</param>\r\n\t/// <returns type=\"Conversation\"/>\r\n};\r\n```","readmeFilename":"README.md","bugs":{"url":"https://github.com/SierraSoftworks/node-conversation/issues"},"_id":"sierra-conversation@1.5.1","dist":{"shasum":"7a3480dc6c298f29848f1410485f146b8096b106","tarball":"https://registry.npmjs.org/sierra-conversation/-/sierra-conversation-1.5.1.tgz","integrity":"sha512-XAGyxzLU/xfztFoYu9ACGdfVpCyvOgGKwGUGJj9SnOyxxhuNhR5UUVxIFhZ9q5w9ZQAg7vpM7qm4evfy8atAdg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDtGzX8eOmq9a41IKzkcMasNxpojlGN86Y8mH+Vzl3jhAiEA4baFESZ8qqE1VMxrEzEoCS2dwd7gVCVg+EQT3IZIgAc="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"spartan563","email":"benjamin.pannell@gmail.com"},"maintainers":[{"name":"spartan563","email":"benjamin.pannell@gmail.com"}]}},"readme":"# Conversations\r\nThis module is designed to provide developers with an extremely powerful testing framework for complex TCP servers which generally require a large amount of boilerplate code or custom test functions. This module provides a fluent, easy to use and incredibly powerful framework on which extremely complex protocols can be tested.\r\n\r\n## Example\r\nAll these things start out with an example of how you can use the test framework. The following is an example of using *node-conversation* with *Mocha*.\r\n\r\n```js\r\nvar Conversation = require('conversation');\r\n\r\ndescribe('protocol', function() {\r\n\tit('should forward messages to the correct user', function(done) {\r\n\t\tnew Conversation({ port: 9119 })\r\n\t\t\t.client('u1').u1.sendAnd('LOGIN:user1;').expect('OK;')\r\n\t\t\t.client('u2').u2.sendAnd('LOGIN:user2;').expect('OK;')\r\n\t\t\t.client('u3').u3.sendAnd('LOGIN:user3;').expect('OK;')\r\n\r\n\t\t\t.u1.writeAnd('CHAT:user2:hello;').expect('SENT:1;')\r\n\t\t\t.u2.expect('MESSAGE:user1:hello;')\r\n\t\t\t.u1.read('RECEIVED:1;')\r\n\r\n\t\t\t.u2.writeAnd('CHAT:user3:hi;').read('SENT:2;')\r\n\t\t\t.u3.read('MESSAGE:user2:hi;')\r\n\t\t\t.u2.read('RECEIVED:2;')\r\n\r\n\t\t\t.run(done);\r\n\t});\r\n});\r\n```\r\n\r\n## Extensibility\r\nDue to its design, it is extremely easy to automate common testing tasks (for example, login processes) by adding to the `Conversation.prototype` or `Conversations.Client.prototype`. This can help make testing systems which require setup tasks to be performed considerably easier.","maintainers":[{"name":"spartan563","email":"benjamin.pannell@gmail.com"}],"time":{"modified":"2022-06-26T19:16:37.696Z","created":"2013-10-14T21:56:51.599Z","1.0.0":"2013-10-14T21:56:59.859Z","1.1.0":"2013-10-16T09:55:47.609Z","1.2.0":"2013-10-16T11:02:22.429Z","1.3.0":"2013-10-16T11:12:02.592Z","1.3.1":"2013-10-16T11:15:23.994Z","1.3.2":"2013-10-16T11:24:21.035Z","1.3.3":"2013-10-16T11:36:54.830Z","1.3.4":"2013-10-16T11:47:53.546Z","1.3.5":"2013-10-16T16:05:31.963Z","1.4.0":"2013-10-16T17:12:42.849Z","1.4.1":"2013-10-16T17:57:21.059Z","1.5.0":"2013-10-16T19:34:01.437Z","1.5.1":"2013-10-16T19:35:45.649Z"},"author":{"name":"Benjamin Pannell","email":"admin@sierrasoftworks.com"},"repository":{"url":"http://github.com/SierraSoftworks/node-conversation"}}