Sha256: e1209a3db1885cf8f306ab653330829ed4ecfc841333adc5587e40b1fdbf40d9
Contents?: true
Size: 685 Bytes
Versions: 6
Compression:
Stored size: 685 Bytes
Contents
var server = require('./server') , events = require('events') , assert = require('assert') , request = require('../main.js') ; var local = 'http://localhost:8888/asdf' try { request({uri:local, body:{}}) assert.fail("Should have throw") } catch(e) { assert.equal(e.message, 'Argument error, options.body.') } try { request({uri:local, multipart: 'foo'}) assert.fail("Should have throw") } catch(e) { assert.equal(e.message, 'Argument error, options.multipart.') } try { request({uri:local, multipart: [{}]}) assert.fail("Should have throw") } catch(e) { assert.equal(e.message, 'Body attribute missing in multipart.') } console.log("All tests passed.")
Version data entries
6 entries across 6 versions & 1 rubygems