does

0.0.11 • Public • Published

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



Readme

Keywords

none

Package Sidebar

Install

npm i does

Weekly Downloads

8

Version

0.0.11

License

none

Last publish

Collaborators

  • nomilous