Neutralize Pesky Miscreants
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    doespublic

    experimental/unstable api changes will still occur (without deprecation warnings) <br> 0.0.11 license

    For spectateability.

    does

    use via ipso injection decorator

     
    module.exports.start = ({port}) -> 
     
        server = require('http').createServer()
        server.listen port-> console.log server.address()
     
     
    ipso = require 'ipso'
     
    describe 'start()'->
     
        it 'starts http at config.port'ipso (facto, http, should) ->
     
            http.does 
                createServer: ->
     
                    # 
                    # return mock server to test for listen( port ) 
                    # 
     
                    listen: (port, hostname) -> 
     
                        port.should.equal 3000
                        should.not.exist hostname
     
     
                # 
                # _createServer: -> console.log '_ denotes spy' 
                #  
     
     
            start port: 3000
            facto()
     

    use standalone

    extends object.prototype with does() and did() for expectation setup and confirmation

     
     

    Keywords

    none

    install

    npm i does

    Downloadsweekly downloads

    12

    version

    0.0.11

    license

    none

    homepage

    github.com

    last publish

    collaborators

    • avatar