ee-formdata-reader
Advanced tools
Comparing version 0.1.15 to 0.1.16
@@ -112,3 +112,3 @@ | ||
, getForm: function(){ | ||
return this.isSupportedType() ? this.form : null; | ||
return this.isSupportedType() ? (this.form || {}) : null; | ||
} | ||
@@ -115,0 +115,0 @@ |
{ | ||
"name" : "ee-formdata-reader" | ||
, "description" : "reads formdata from requests" | ||
, "version" : "0.1.15" | ||
, "version" : "0.1.16" | ||
, "homepage" : "https://github.com/eventEmitter/ee-formdata-reader" | ||
@@ -6,0 +6,0 @@ , "author" : "Michael van der Weg <michael@eventemitter.com> (http://eventemitter.com/)" |
@@ -48,2 +48,3 @@ | ||
Object.keys(message).forEach(function(key){// log(message[key]); | ||
@@ -97,2 +98,13 @@ if (Array.isArray(message[key])){ | ||
}); | ||
it('Should be able to decode an empty multipart post', function(done){ | ||
var reader = new FormdataReader({ | ||
request: createRequest('post4.mime', 'multipart/form-data;') | ||
}); | ||
reader.on('end', function(){ | ||
assert.equal(JSON.stringify({}), JSON.stringify(reader.getForm()), 'message hash is different!') | ||
done(); | ||
}); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15087
12
234