Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

does

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

does

For expectations

  • 0.0.11
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
31
increased by24%
Maintainers
1
Weekly downloads
 
Created
Source

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



FAQs

Package last updated on 28 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc