mirror of
https://github.com/electron/node-gyp.git
synced 2025-09-16 22:13:39 +02:00
Commit node_modules.
For @billywhizz :) And cause it's just an all around good idea for command-line apps.
This commit is contained in:
parent
d39620999f
commit
24bde139e1
255 changed files with 20261 additions and 0 deletions
30
node_modules/request/tests/test-errors.js
generated
vendored
Normal file
30
node_modules/request/tests/test-errors.js
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
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.")
|
Loading…
Add table
Add a link
Reference in a new issue