{"_id":"mocha-given","_rev":"48-fd227bc228c71135599ec0942531d034","name":"mocha-given","dist-tags":{"latest":"0.4.0"},"versions":{"0.0.1":{"name":"mocha-given","version":"0.0.1","keywords":["mocha","given","when","then","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.0.1","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"66086292d3aa36c7f071d8f5bcf671ce9d688542","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.0.1.tgz","integrity":"sha512-MolS+lpgDHclLJN5qZ8r3Xod63rXUYCNllHYzxBUoaX8P//fPRYOXKptu4riaAWk7sDBtIaAHB3fcdDTydKU1Q==","signatures":[{"sig":"MEYCIQCh7ZSyhf0v3Zj8q5utjWRAah9LqWP57alVgs8sMBDlaAIhAJok6qlKd0JpSY8Vgvso0QznOwbNAAt+vBTHa5UGXmOi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"https://github.com/rendro/mocha-given.git","type":"git"},"_npmVersion":"1.3.14","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","directories":{},"dependencies":{"expect.js":"~0.2.0","coffee-script":"~1.6.3"}},"0.0.2":{"name":"mocha-given","version":"0.0.2","keywords":["mocha","given","when","then","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.0.2","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"5a5b958c6b989827780d45b4d6cf42c4a7cad4b5","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.0.2.tgz","integrity":"sha512-+9UGXZzoCVieGCgQasuIlQyMmrK4+sRe5I8ny8+wtrNIBocDogppPh9PTjMNoUQxSzWH/5iQyRrUE0QGYKdMQw==","signatures":[{"sig":"MEUCIQD8nQWk+uZndnGPtfZkkKiFOHPRBczVoyBjsigprM9FwgIgPiyueBfz4FvyjEqG9fo8aJYxc8Gi4TvOy7pONhmOnA4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"https://github.com/rendro/mocha-given.git","type":"git"},"_npmVersion":"1.3.14","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","directories":{},"dependencies":{"expect.js":"~0.2.0","coffee-script":"~1.6.3"}},"0.0.3":{"name":"mocha-given","version":"0.0.3","keywords":["mocha","given","when","then","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.0.3","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"22280abb7d2762ab738d75ab1dbcfe0e6817f611","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.0.3.tgz","integrity":"sha512-P8hz5I9/O7H72S6rbtbJ57JKAGx7JynRPZ8rEuuTz2SwH/T/GJleXL5mdS7UrCXcUitQbrHyd0iEAcjbiUInbg==","signatures":[{"sig":"MEUCIQCGgPFWDv+K2LRkA5cEfigg+eFA/x/vZQC+eqFnAoXZwQIgJHdmeeHz7izSUbLOBymX+K6Nl3RLzcDSuKSSKIFUi00=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"https://github.com/rendro/mocha-given.git","type":"git"},"_npmVersion":"1.3.14","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","directories":{},"dependencies":{"expect.js":"~0.2.0","coffee-script":"~1.6.3"}},"0.0.4":{"name":"mocha-given","version":"0.0.4","keywords":["mocha","given","when","then","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.0.4","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"1522b75ec797cf2be83f760dab086156a4908708","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.0.4.tgz","integrity":"sha512-wVP1luI4dmrvTCXJPUgm7wiojzr4AcIVIHSEghUYi70wrpxEmoLgCeoi8CQTe7CYduVq6qRCzLiCuLO1u8VtxA==","signatures":[{"sig":"MEYCIQDIFkqvTNBxsOurhE58kdjgM5hvYAaZT82fCp+pevg5JwIhAJL2gq/CsVichvurspSQ3YgX+b3tkrHzUypmF32NTBU5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"https://github.com/rendro/mocha-given.git","type":"git"},"_npmVersion":"1.3.14","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","directories":{},"dependencies":{"expect.js":"~0.2.0","coffee-script":"~1.6.3"}},"0.0.5":{"name":"mocha-given","version":"0.0.5","keywords":["mocha","given","when","then","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.0.5","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"33bad06493aed6bfc743534fe3b516af064dd91e","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.0.5.tgz","integrity":"sha512-laKhoWlwWFa/2wpXpMwlc4Pxn6T7iPIoaPKHvOqLuSLKz9wR7T5I9l1AhwW3u4skilfvHALA7t0phkxbIUejFg==","signatures":[{"sig":"MEYCIQD2hZ1I6EbpAOJPl5AxktdVmGLQsq4UckinI69rC7afTQIhAI8Ax23djNq7UMM2AtcIAhSuYT97qJ2QYrKD+nM7BUEh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"https://github.com/rendro/mocha-given.git","type":"git"},"_npmVersion":"1.3.14","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","directories":{},"dependencies":{"expect.js":"~0.2.0","coffee-script":"~1.6.3"}},"0.0.6":{"name":"mocha-given","version":"0.0.6","keywords":["mocha","given","when","then","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.0.6","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"c069b6f110b37df36cfc366695bca2dd866c28fb","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.0.6.tgz","integrity":"sha512-4RMnZIb8qT2HHH+iHD/wNNQ0No07rnd8RJ9eXQIOJDJ1IAOod4sSI2acMBGmiMwEkILvCgm3HONfO/s41XFt/Q==","signatures":[{"sig":"MEUCIQCzw4PGPKDWItF8TAvPIl4+r2zIGJbXNcYyuo2BBmAIGQIgbLX8fT8PmTCkC/9vJO3xJi8CiltVPltf4lQD+2LiTeU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"https://github.com/rendro/mocha-given.git","type":"git"},"_npmVersion":"1.3.14","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","directories":{},"dependencies":{"expect.js":"~0.2.0","coffee-script":"~1.6.3"}},"0.0.7":{"name":"mocha-given","version":"0.0.7","keywords":["mocha","given","when","then","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.0.7","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"3c0161676b1d5f54f8dd631c0b471a553a2cf9ae","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.0.7.tgz","integrity":"sha512-UVvTMh6J9wR0ocXkaDKtrdb4vGEYiUHvOBFI8pta1TsQS4b77sXmCUHvW7hhUQEKKGquG0KVaukiSFU8p5AM9g==","signatures":[{"sig":"MEUCIC4TAqwYc0uqJGkaoLFawtHDJc6XDNiknNB25c2t/sDsAiEAz6BvxARWTpSQ4OH09UWOYAPWP52w62Mh6SYoN3CdCPI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"https://github.com/rendro/mocha-given.git","type":"git"},"_npmVersion":"1.3.14","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","directories":{},"dependencies":{"expect.js":"~0.2.0","coffee-script":"~1.6.3"}},"0.0.8":{"name":"mocha-given","version":"0.0.8","keywords":["mocha","given","when","then","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.0.8","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"e3205d23605238571931be2c35e821ef225ab5eb","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.0.8.tgz","integrity":"sha512-vusJS/tkg5JvZyF/AzvMRyeXs4YBBk4my2j64CHGO84avB3EdWz/YbeeXCLJIPiXCjvYatoms/v+GnOl8nzM8w==","signatures":[{"sig":"MEQCIGf7yE6iAyPy1lKPOyssy49JVCaKJb9oYiaoF6BKAZZJAiBkxI/i+oGBvVw2iu6riDbawhluXBtbHHgbLTHSlvxSLw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","scripts":{"test":"./node_modules/.bin/mocha -u mocha-given --compilers coffee:coffee-script -R spec"},"_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"https://github.com/rendro/mocha-given.git","type":"git"},"_npmVersion":"1.3.14","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","directories":{},"dependencies":{"expect.js":"~0.2.0","coffee-script":"~1.6.3"},"devDependencies":{"mocha":"~1.15.1","mocha-given":"~0.0.8","coffee-script":"~1.6.3"}},"0.0.9":{"name":"mocha-given","version":"0.0.9","keywords":["mocha","given","when","then","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.0.9","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"6f9c1908d6eda83503e20bea5ab793aa341eb085","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.0.9.tgz","integrity":"sha512-/uJ6ddlqZP2HO0V1X5dxw0dUA1rDDnLjYWOvQNu03QyurUdV8vFPQIUqK4t6PoS4ybZd9gzoikR3zBEFgOroPw==","signatures":[{"sig":"MEYCIQCaBpoZdUZIAQvd6op1Vt+nw0IN3WIvdQxU841+atrFwgIhAIBXl1ttMVEPYMezXjrhbzVrM0DgV1R+eoUmsS59pE+H","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","scripts":{"test":"./node_modules/.bin/mocha -u mocha-given --compilers coffee:coffee-script -R spec"},"_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"https://github.com/rendro/mocha-given.git","type":"git"},"_npmVersion":"1.3.14","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","directories":{},"dependencies":{"expect.js":"~0.2.0","coffee-script":"~1.6.3"},"devDependencies":{"mocha":"~1.15.1","mocha-given":"~0.0.9","coffee-script":"~1.6.3"}},"0.0.10":{"name":"mocha-given","version":"0.0.10","keywords":["mocha","given","when","then","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.0.10","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"809da20f06bc50ca3e01296d0639495159e84ac6","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.0.10.tgz","integrity":"sha512-1MjIGH2Pw/jtJ5gcgDsPuJmkanKLydyEJqieQxC/ttQA59s+yCD+0/Ky2gw1qMFQLCwBPp0ZNISEpxX5SPQBzA==","signatures":[{"sig":"MEYCIQCbk7SQgSx1Ke4qWsO3+EPsneEOq7l7VPgLRVPvVM9PAAIhAMtwgotSozhe+NruBYSunxkuCho6lXbY2LlwDljvYcJe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","scripts":{"test":"./node_modules/.bin/mocha -u mocha-given --compilers coffee:coffee-script -R spec"},"_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"https://github.com/rendro/mocha-given.git","type":"git"},"_npmVersion":"1.3.14","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","directories":{},"dependencies":{"expect.js":"~0.2.0","coffee-script":"~1.6.3"},"devDependencies":{"mocha":"~1.15.1","mocha-given":"~0.0.10","coffee-script":"~1.6.3"}},"0.0.11":{"name":"mocha-given","version":"0.0.11","keywords":["mocha","given","when","then","test","tdd","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.0.11","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"d219aa51bffb5b2b786c539242db535fbf59fbe5","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.0.11.tgz","integrity":"sha512-foKHnZSh/MMHvKC4l2dGMUH5fhdHUu3zgFeP5RR1/FzVrMDzhnnIPkFUemiVmJR0H4YxyDR6D7tPPwPWUvMm7w==","signatures":[{"sig":"MEUCIQDOjneW/sqGkKEGFRZnjKUKd9+0GcM2P7DymFC4zRbC0QIgPP9wyvtDPYUt5A/QCSaYWNcH4b7mWDxsfXYHEVQtehc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","scripts":{"test":"./node_modules/.bin/mocha -u mocha-given --compilers coffee:coffee-script -R spec"},"_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"https://github.com/rendro/mocha-given.git","type":"git"},"_npmVersion":"1.3.14","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","directories":{},"dependencies":{"expect.js":"~0.2.0","coffee-script":"~1.6.3"},"devDependencies":{"mocha":"~1.15.1","mocha-given":"~0.0.11","coffee-script":"~1.6.3"}},"0.0.12":{"name":"mocha-given","version":"0.0.12","keywords":["mocha","given","when","then","test","tdd","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.0.12","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"0ea68dc771499955a8ef1fda833fd5e37c375b9f","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.0.12.tgz","integrity":"sha512-0sLa9c6FTKfuPMF4FxbIfzWwGUQyob0tNKIvVPLvws7r0RLmSYdGF7dmjXOhuDQrrSvi0RLbjjzPHHlQQzmD7g==","signatures":[{"sig":"MEYCIQDWA3SR51AJw+NHdnot1ia49l6IH2lC+UsXuTkgL6XC2gIhALqx7DJmLBJQCKCmYMKezB6SeP8AeYouOZxcNwSLNFh5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","scripts":{"test":"./node_modules/.bin/mocha -u mocha-given --compilers coffee:coffee-script -R spec"},"_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"https://github.com/rendro/mocha-given.git","type":"git"},"_npmVersion":"1.3.14","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","directories":{},"dependencies":{"coffee-script":"~1.6.3"},"devDependencies":{"mocha":"~1.15.1","mocha-given":"~0.0.12","coffee-script":"~1.6.3"}},"0.0.13":{"name":"mocha-given","version":"0.0.13","keywords":["mocha","given","when","then","test","tdd","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.0.13","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"1067325acee528a5aa9259c5bb024f2bd6997433","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.0.13.tgz","integrity":"sha512-eslOLxxCSITkx8pYDikT36XJTorVDQq3DpI/S93B9Nz7WV3MtRPJpESConA++0hTpzTqFqFxkfJC08ZA81U6cA==","signatures":[{"sig":"MEYCIQCC/MYHq4q+jlSa6P6QJeBn4laS3R/pFaWPPQ8bfp2O/wIhAKpCjwLdk9/knnCZrjKGYEYev6jam40pIf1SpZ/GkKzy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","scripts":{"test":"./node_modules/.bin/mocha -u mocha-given --compilers coffee:coffee-script -R spec"},"_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"https://github.com/rendro/mocha-given.git","type":"git"},"_npmVersion":"1.3.14","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","directories":{},"dependencies":{"coffee-script":"~1.6.3"},"devDependencies":{"mocha":"~1.15.1","expect.js":"~0.2.0","mocha-given":"~0.0.13","coffee-script":"~1.6.3"}},"0.0.15":{"name":"mocha-given","version":"0.0.15","keywords":["mocha","given","when","then","test","tdd","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.0.15","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"ce469e09fdc14edc7f6da46c770ae9eac77a3350","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.0.15.tgz","integrity":"sha512-awP7Vz7uOETvN3Uf4tJspMTzEveOcM0YaQxRU8Sv7CaqEeyzpcKXqC0D92ebKl/I7R3mkj2gPzeBzzi5WxVqbg==","signatures":[{"sig":"MEUCIAItrUREV1/e3veie4TOrNlNGaoLHCZYSZYyzUGqkbDmAiEA8e4f9pRWzy1f8cM7guf7y0QdHrB8VI4/+dGYWnr3q70=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","scripts":{"test":"./node_modules/.bin/mocha -u mocha-given --compilers coffee:coffee-script -R spec","prepublish":"./node_modules/.bin/coffee -cbo browser lib/mocha-given.coffee"},"_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"https://github.com/rendro/mocha-given.git","type":"git"},"_npmVersion":"1.3.14","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","directories":{},"dependencies":{"coffee-script":"~1.6.3"},"devDependencies":{"expect.js":"~0.2.0"},"peerDependencies":{"mocha":"~1.15.1"}},"0.0.16":{"name":"mocha-given","version":"0.0.16","keywords":["mocha","given","when","then","test","tdd","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.0.16","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"68f190d71f86a2621dc80b5a735ae74c94da40d1","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.0.16.tgz","integrity":"sha512-iRNp4Mq3DgioRRWCpLEdTMkssEgBx5tv0wT4olHvExZdZgSCKOF18hSdLz9B7xgV5lxEtC0FSADxLtBN4e2bww==","signatures":[{"sig":"MEYCIQCJ4q4JezSrJr85bVW/k+yWrtm80/ZxGHt9vzUoMBvbBwIhAOytYGQIxDLCxwTp08ANRkRLD/8M4auDHypxp7Gl8Pip","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","scripts":{"test":"./node_modules/.bin/mocha -u mocha-given --compilers coffee:coffee-script -R spec","prepublish":"./node_modules/.bin/coffee -cbo browser lib/mocha-given.coffee"},"_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"https://github.com/rendro/mocha-given.git","type":"git"},"_npmVersion":"1.3.17","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","directories":{},"dependencies":{"coffee-script":"~1.6.3"},"devDependencies":{"expect.js":"~0.2.0"},"peerDependencies":{"mocha":"~1.15.1"}},"0.0.17":{"name":"mocha-given","version":"0.0.17","keywords":["mocha","given","when","then","test","tdd","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.0.17","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"bbcd0bc46da6eaccfb959350da6816d31bd7592b","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.0.17.tgz","integrity":"sha512-tfIQ0tPnQvKl43BAoxYIcnfKrRBYvU+wq8m2Utf0pl2DlZx2Dd73Dgo9YbXqsv7clWmKiyPIDQiKF6VhOHkzIw==","signatures":[{"sig":"MEUCIC3SCO98DJlxM4CHHvhV334/nG6u5PNBX6Rp6q4pYcNpAiEA2BB7KX0syes9iO9PK5gBOlTi3DnE445ohe/ExGkntjk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","scripts":{"test":"./node_modules/.bin/mocha -u mocha-given --compilers coffee:coffee-script -R spec","prepublish":"./node_modules/.bin/coffee -cbo browser lib/mocha-given.coffee"},"_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"git://github.com/rendro/mocha-given","type":"git"},"_npmVersion":"1.3.17","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","directories":{},"dependencies":{"coffee-script":"~1.6.3"},"devDependencies":{"expect.js":"~0.2.0"},"peerDependencies":{"mocha":"~1.15.1"}},"0.0.18":{"name":"mocha-given","version":"0.0.18","keywords":["mocha","given","when","then","test","tdd","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.0.18","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"8412d48e97d6a9dd82c0d1a71307c3cafbeb13ae","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.0.18.tgz","integrity":"sha512-0rsm10U6FBXz1J078GcHTs88vmTZwaqajzSrIjKX0gJoN4KFzHY8KfxZsr4pXylTPglAQQo9cz+irVVv9CvPBg==","signatures":[{"sig":"MEYCIQDFOHbn8U7DNFsK99LnI1HOEsvoVDlJr3rqh3ZKTLGAOgIhAKvnyW1pphocw5mIpLrIXb9ADfBUN+wQh2TRF2xDjjwC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","scripts":{"test":"./node_modules/.bin/mocha -u mocha-given --compilers coffee:coffee-script -R spec","prepublish":"./node_modules/.bin/coffee -cbo browser lib/mocha-given.coffee"},"_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"git://github.com/rendro/mocha-given","type":"git"},"_npmVersion":"1.3.23","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","directories":{},"dependencies":{"coffee-script":"~1.6.3"},"devDependencies":{"expect.js":"~0.2.0"},"peerDependencies":{"mocha":"~1.16.0"}},"0.1.0":{"name":"mocha-given","version":"0.1.0","keywords":["mocha","given","when","then","test","tdd","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.1.0","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"0323a937fadf01ebecbc0548191b407a49aeceea","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.1.0.tgz","integrity":"sha512-5iCqRMhcN6o5/9KdxeD/Kqwk2bsegfVuRSHO24qeViqR9sSvcm90Q5a1y6vP44YeNdDJQgSZmh3HEeIGY+r72g==","signatures":[{"sig":"MEQCIAuv4m0j9Z57UrEimh6YR1EyG4cfnoWheAWDFmyVcGqOAiBkUgRSBFRmOb/UTNaR+ogSOZRhVMytiyq/lM3AUf30Jw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","scripts":{"test":"mocha -u mocha-given --compilers coffee:coffee-script -R spec","prepublish":"coffee -cbo browser lib/mocha-given.coffee"},"_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"git://github.com/rendro/mocha-given","type":"git"},"_npmVersion":"1.3.24","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","dependencies":{"coffee-script":"~1.7.1"},"devDependencies":{"expect.js":"~0.2.0"},"peerDependencies":{"mocha":"~1.17.1"},"directories":{}},"0.1.1":{"name":"mocha-given","version":"0.1.1","keywords":["mocha","given","when","then","test","tdd","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.1.1","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"1de4d0cc61318681868ee6ae565130d7cba6dc63","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.1.1.tgz","integrity":"sha512-c9TpSrdtoGiqMMkiUfUuXJ12QeZ7PkqHxV6tuUdXhseL67shTc+omL1XmVFhGxaOrVc0aBhHmUuucsaMF6yyfw==","signatures":[{"sig":"MEUCIDTKW/lNU9spTkjMm1ZxetRrUW/+bjEPwwUdA4GvbVUVAiEAxne1t69AoadYnvUY5OEWXNjweZuQ7pAJJ6pw8lzVFF8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","scripts":{"test":"./node_modules/.bin/mocha -u mocha-given --compilers coffee:coffee-script -R spec","prepublish":"./node_modules/.bin/coffee -cbo browser lib/mocha-given.coffee"},"_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"rendro/mocha-given","type":"git"},"_npmVersion":"1.3.2","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","dependencies":{"coffee-script":"~1.7.1"},"devDependencies":{"expect.js":"~0.3.1"},"peerDependencies":{"mocha":"~1.20.1"},"directories":{}},"0.1.2":{"name":"mocha-given","version":"0.1.2","keywords":["mocha","given","when","then","test","tdd","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.1.2","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"f82bd38bb69ddfc385040c35f37d4ef60a8c06ad","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.1.2.tgz","integrity":"sha512-cJr3koWvO2mIisJYvMTW/F+kfMZXpFeUYblCsqnEUupvR/I4qOXKKxpJqqR7haUkYFP+ng6eDtu/okj+uYQkFw==","signatures":[{"sig":"MEUCIQD//bbKW0LyNJVpEDTokdKa/TnLxdHpItzaEfwnVH+UngIgIg0AO9ccICU4eiirlDiK6oJbdVCjHEq8p+tvFhC1/pM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","_shasum":"f82bd38bb69ddfc385040c35f37d4ef60a8c06ad","browser":"./browser/mocha-given.js","gitHead":"25be07ae86bce8eba016a5373fee52f4bfff66e0","scripts":{"test":"mocha -u mocha-given --compilers coffee:coffee-script -R spec","prepublish":"coffee -cbo browser lib/mocha-given.coffee"},"_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"git://github.com/rendro/mocha-given","type":"git"},"_npmVersion":"1.4.14","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","dependencies":{"coffee-script":"~1.7.1"},"devDependencies":{"expect.js":"~0.3.1"},"peerDependencies":{"mocha":"~1.20.1"},"directories":{}},"0.1.3":{"name":"mocha-given","version":"0.1.3","keywords":["mocha","given","when","then","test","tdd","bdd"],"author":{"url":"http://robert-fleischmann.de","name":"Robert Fleischmann","email":"rendro87@gmail.com"},"_id":"mocha-given@0.1.3","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"homepage":"https://github.com/rendro/mocha-given","bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"dist":{"shasum":"8bd4cdf8eb2d85c669120db90d4b9056845d8b97","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.1.3.tgz","integrity":"sha512-Q8EVOZ8Slk95Ev8hh0MGSWAveUh5YOJmarls1FqRrc0Uoi+pEi6A2EU7yvnndoZVce60RNuDTsZpiPUPmBy25w==","signatures":[{"sig":"MEQCIF2YUiiTBS8lE0sBj4FMTnXQeC5vEalqaPcWbE9axoJtAiBCk+FMVRMf1TtKDb0XZyv8s7SRbZ54AZdepVUZ3FJTTA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","_from":".","_shasum":"8bd4cdf8eb2d85c669120db90d4b9056845d8b97","browser":"./browser/mocha-given.js","gitHead":"513a115558998c3f5ec06326fb398b63393b91f8","scripts":{"link":"mkdir -p node_modules/mocha-given && cd node_modules/mocha-given && ln -s ../../package.json package.json && ln -s ../../index.js index.js && ln -s ../../lib lib && cd -","test":"mocha -u mocha-given --compilers coffee:coffee-script -R spec","prepublish":"coffee -cbo browser lib/mocha-given.coffee"},"_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"licenses":[{"url":"http://www.apache.org/licenses/LICENSE-2.0","name":"Apache License 2.0"}],"repository":{"url":"https://github.com/rendro/mocha-given","type":"git"},"_npmVersion":"1.4.28","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","dependencies":{"coffee-script":"~1.7.1"},"devDependencies":{"mocha":"~1.20.1","expect.js":"~0.3.1"},"peerDependencies":{"mocha":">=1.20.1"},"directories":{}},"0.4.0":{"name":"mocha-given","version":"0.4.0","description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","author":{"name":"Robert Fleischmann","email":"rendro87@gmail.com","url":"https://robert-fleischmann.com"},"license":"MIT","main":"./index.js","browser":"./lib/mocha-given.js","peerDependencies":{"mocha":">=8"},"devDependencies":{"coffeescript":"^2.7.0","expect.js":"~0.3.1","mocha":"^11.7.6"},"scripts":{"test":"npm run test:js && npm run test:coffee","test:js":"mocha --require ./index.js --ui mocha-given test/*.js","test:coffee":"mocha --require ./index.js --require coffeescript/register --ui mocha-given test/coffee-compat.coffee"},"keywords":["mocha","given","when","then","test","tdd","bdd","interface","ui"],"bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"homepage":"https://github.com/rendro/mocha-given","repository":{"type":"git","url":"git+https://github.com/rendro/mocha-given.git"},"_id":"mocha-given@0.4.0","gitHead":"7510a571f9e4e3919075d4fd7744fe479261ede1","_nodeVersion":"22.15.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-JXcEo8WpxYM8XMibqZrU16F578/Tqv07S5Q9oxoOa3f3Ii8R1CU9/VPaBSUdXVyGDVMlKnGJWR2Vr3tySL2nLA==","shasum":"a25523cc3bfc2695a77240347a4290085cc370b3","tarball":"https://registry.npmjs.org/mocha-given/-/mocha-given-0.4.0.tgz","fileCount":5,"unpackedSize":25648,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCJhoNhSoGysR1ZjQLkuU6+vrb4GTSOrrO36/KljbVNgwIhAJmgWey79WfSBRvBsbQGuUevCUjTgQT1XtkHu0IvM3NR"}]},"_npmUser":{"name":"rendro","email":"rendro87@gmail.com"},"directories":{},"maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mocha-given_0.4.0_1784755757086_0.960752549079851"},"_hasShrinkwrap":false}},"time":{"created":"2013-12-03T00:50:48.784Z","modified":"2026-07-22T21:29:17.388Z","0.0.1":"2013-12-03T00:50:51.805Z","0.0.2":"2013-12-03T09:58:12.405Z","0.0.3":"2013-12-03T15:47:30.152Z","0.0.4":"2013-12-03T16:03:01.448Z","0.0.5":"2013-12-04T16:29:55.505Z","0.0.6":"2013-12-05T00:00:31.988Z","0.0.7":"2013-12-05T13:23:06.011Z","0.0.8":"2013-12-09T13:18:57.044Z","0.0.9":"2013-12-09T22:53:32.195Z","0.0.10":"2013-12-09T23:44:54.734Z","0.0.11":"2013-12-10T12:37:33.881Z","0.0.12":"2013-12-10T23:12:36.243Z","0.0.13":"2013-12-11T01:15:59.724Z","0.0.15":"2013-12-11T16:04:11.505Z","0.0.16":"2013-12-13T00:08:10.400Z","0.0.17":"2013-12-16T23:57:59.751Z","0.0.18":"2014-01-08T17:40:26.210Z","0.1.0":"2014-02-04T15:54:43.734Z","0.1.1":"2014-06-05T19:35:17.176Z","0.1.2":"2014-07-10T07:59:39.516Z","0.1.3":"2014-09-20T16:12:08.321Z","0.4.0":"2026-07-22T21:29:17.228Z"},"bugs":{"url":"https://github.com/rendro/mocha-given/issues"},"author":{"name":"Robert Fleischmann","email":"rendro87@gmail.com","url":"https://robert-fleischmann.com"},"homepage":"https://github.com/rendro/mocha-given","keywords":["mocha","given","when","then","test","tdd","bdd","interface","ui"],"repository":{"type":"git","url":"git+https://github.com/rendro/mocha-given.git"},"description":"Adds a Given-When-Then DSL to mocha as an alternative style for specs","maintainers":[{"name":"rendro","email":"rendro87@gmail.com"}],"readme":"# mocha-given\n\n[![CI](https://github.com/rendro/mocha-given/actions/workflows/ci.yml/badge.svg)](https://github.com/rendro/mocha-given/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/mocha-given.svg)](https://www.npmjs.com/package/mocha-given)\n\nMocha-given is a mocha interface that helps you write cleaner specs using `Given`, `When`, `Then` and `And`.\nIt is a shameless port of Justin Searls' [jasmine-given](https://github.com/searls/jasmine-given) which is a tribute to Jim Weirich's terrific [rspec-given](https://github.com/jimweirich/rspec-given) gem.\n\nZero dependencies. Works with mocha 8 through 11.\n\n## Install\n\n```\n$ npm install --save-dev mocha mocha-given\n```\n\nRun your specs with the interface set to `mocha-given`:\n\n```\n$ mocha --ui mocha-given\n```\n\n## Example specs\n\n### JavaScript\n\n```js\ndescribe('assigning stuff to this', function () {\n  Given(function () { this.number = 24; });\n  When(function () { this.number++; });\n  And(function () { this.number *= 2; });\n  Then(function () { return this.number === 50; });\n});\n\ndescribe('assigning stuff to variables', function () {\n  let subject = null;\n  Given(() => { subject = []; });\n  When(() => { subject.push('foo'); });\n  Then(() => subject.length === 1);\n});\n\ndescribe('Testing deferred', function () {\n  Given(function () { this.t = Date.now(); });\n  Then.after(1500, 'so much time has passed', function () {\n    return Date.now() - this.t >= 1500;\n  });\n});\n\ndescribe('Testing async', function () {\n  Given(function () { this.subject = new User(); });\n  Then('save user', function (done) { this.subject.save(done); });\n});\n```\n\n### CoffeeScript\n\n```coffee\ndescribe 'assigning stuff to this', ->\n\tGiven -> @number = 24\n\tWhen  -> @number++\n\tAnd   -> @number *= 2\n\tThen  -> @number == 50\n\ndescribe 'assigning stuff to variables', ->\n\tsubject = null\n\tGiven -> subject = []\n\tWhen  -> subject.push('foo')\n\tThen  -> subject.length == 1\n\ndescribe 'Testing deferred', ->\n\tGiven -> @t = Date.now()\n\tThen.after 1500, 'so much time has passed', -> Date.now() - @t >= 1500\n\ndescribe 'Testing async', ->\n\tGiven -> @subject = new User()\n\tThen 'save user', (done) -> @subject.save(done);\n```\n\nCoffeeScript specs need the compiler registered yourself, which mocha-given no\nlonger does for you:\n\n```\n$ mocha --ui mocha-given --require coffeescript/register --extension coffee\n```\n\n## Arrow functions and `this`\n\nBoth styles below work, but they are not interchangeable.\n\nState shared between `Given`, `When` and `Then` lives on mocha's test context,\nwhich you reach through `this`. Arrow functions do not bind `this`, and neither\n`call` nor `apply` can change that, so a spec that touches `this` **must** use a\nclassic function:\n\n```js\nGiven(function () { this.number = 24; });     // writes to the test context\nThen(function () { return this.number === 24; });\n\nGiven(() => { this.number = 24; });            // writes to module scope\nThen(() => this.number === 24);                // reads module scope\n```\n\nThe arrow version is worse than it looks. It often *passes*, because in\nCommonJS the module-level `this` is `module.exports`, so both arrows share one\nobject. But that object is global to the file and is never reset between tests,\nso state leaks from one spec into the next:\n\n```js\ndescribe('first', function () {\n  Given(() => { this.n = 1; });\n  Then(() => this.n === 1);        // passes\n});\ndescribe('second', function () {\n  Then(() => this.n === 1);        // also passes, with no Given at all\n});\n```\n\nSpecs built on closure variables have no such constraint, and arrows read\nbetter there:\n\n```js\nlet subject = null;\nGiven(() => { subject = []; });\nThen(() => subject.length === 0);\n```\n\n| Spec style | Use |\n| --- | --- |\n| `this.foo` shared state | `function` |\n| closure variables | arrow, or `function` |\n\n## And after Then\n\nAn `And` following a `Then` becomes part of that same spec, so the `Given` and\n`When` setup runs **once** for the whole group rather than once per assertion:\n\n```js\nGiven(function () { this.subject = expensiveSetup(); });\nWhen(function () { this.result = this.subject.run(); });\nThen(function () { return this.result.ok === true; });\nAnd(function () { return this.result.items.length === 3; });\nAnd(function () { return this.result.errors.length === 0; });\n```\n\nThat is one test, one setup. Its title joins the assertions:\n\n```\n✔ then this.result.ok === true and this.result.items.length === 3 and this.result.errors.length === 0\n```\n\nTwo separate `Then`s still run the setup twice, which is the distinction\n[rspec-given](https://github.com/jimweirich/rspec-given) and\n[jasmine-given](https://github.com/searls/jasmine-given) draw. Use `And` when\nseveral assertions describe one outcome, and a second `Then` when you want a\nfresh fixture.\n\n`And` after a `Given`, `When` or `Invariant` is unchanged: it repeats that\nconstruct.\n\n## Promises\n\n`Given`, `When`, `Invariant` and `Then` may all return a promise, and each step\nis awaited before the next one runs.\n\n```js\ndescribe('loading a user', function () {\n  Given('user', async () => fetchUser(1));\n  When('name', function () { return this.user.name; });\n  Then(function () { return this.name === 'Ada'; });\n});\n```\n\nThe named forms assign the **resolved value**, not the promise, so `this.user`\nabove is the user object.\n\nA `Then` that resolves to `false` fails, and a rejection fails with its own\nerror. A step may take a `done` callback or return a promise, but not both.\n\n## API\n\n| | |\n| --- | --- |\n| `Given(fn)` | Runs before each `Then` in scope. Sets up state |\n| `Given(name, fn)` | Assigns the return value to `this[name]` |\n| `When(fn)` | Runs after all `Given`s, immediately before each `Then` |\n| `When(name, fn)` | Assigns the return value to `this[name]` |\n| `Then(fn)` | A spec. Fails if `fn` returns `false` or throws |\n| `Then(label, fn)` | Same, with an explicit title |\n| `Then.after(ms, label, fn)` | Runs the assertion after a delay |\n| `Then.only(...)` | Runs only this spec |\n| `And(fn)` | Repeats whichever of `Given`, `When` or `Invariant` came last. After a `Then` it adds an assertion to that same spec |\n| `Invariant(fn)` | Asserted before every `Then` in scope |\n\nA `Then` without a label takes its title from the source of the expression, so\n`Then(() => this.sum === 5)` reads as `then this.sum === 5`. Comments inside the\nfunction body end up in the title, so keep them above the call.\n\nWhen an assertion fails, the comparison is reported with both sides evaluated:\n\n```\n1) then this.sum === 99:\n   Error: return value is false\n   Expected '5' to strictly equal '99'\n   Comparison: this.sum === 99\n```\n\n## Run tests programmatically\n\n```js\nconst Mocha = require('mocha');\nconst fs = require('fs');\nconst path = require('path');\n\n// require mocha-given after Mocha is loaded\nrequire('mocha-given');\n\nconst testDir = 'test';\n\nconst mocha = new Mocha({\n  ui: 'mocha-given',\n  reporter: 'spec',\n});\n\nfs.readdirSync(testDir)\n  .filter((file) => /\\.(coffee|js)$/.test(file))\n  .forEach((file) => mocha.addFile(path.join(testDir, file)));\n\nmocha.run((failures) => {\n  process.exitCode = failures ? 1 : 0;\n});\n```\n\n## Contributing\n\n```\n$ npm install\n$ npm test\n```\n\n`npm test` runs the JavaScript specs and then a small CoffeeScript spec that\nguards against breaking CoffeeScript users.\n\n## Credits\n\nThanks to [SinnerSchrader](http://www.sinnerschrader.com/) for their support and the time to work on this project.\n\n## License\n\nMIT\n","readmeFilename":"readme.md","users":{"pje":true},"license":"MIT"}