0.1.0 • Published 10 years ago

honk-test-net v0.1.0

Weekly downloads
15
License
-
Repository
-
Last release
10 years ago

Honk! Test Net!

Some tools to help test browser-based network-y things in a headless environmentment.

XMLHttpRequest

The underlying mock-thing-out-er-ator is based on Philipp von Weitershausen's mock_server.js impl. Seems to work well.

In a mocha or Jasmine environment, including this file will give you a @server properly set up and torn down around all your tests.

Usage is as so:

require 'honk-test-net/http_server'

describe 'Remote Pants Service', ->

  it 'should give me info on pants', (done) ->
    @server.when 'GET', '/pants', (req) ->
      status: 200
      body:   'Pants Found'

    $.get '/',
      success: (resp) ->
        expect(resp.data).to.equal 'Pants Found'
        done()

Build status

Build Status

0.1.0

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

11 years ago

0.0.0

11 years ago