Sha256: b6dd767152ddb4743af6f3dd0a9112d3341a190b55ce57e3b44e7bfe1e396533
Contents?: true
Size: 844 Bytes
Versions: 7
Compression:
Stored size: 844 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.') } try { request(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
7 entries across 7 versions & 2 rubygems