Skip to content

Commit

Permalink
[fix dist] Update package-lock.json. Add .gitattributes. Uncomment fa…
Browse files Browse the repository at this point in the history
…iling test.
  • Loading branch information
indexzero committed Dec 3, 2018
1 parent 4499def commit b4dcb4f
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 74 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock.json binary
78 changes: 39 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 35 additions & 35 deletions test/header-test.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
var assert = require('assert'),
request = require('request'),
vows = require('vows'),
union = require('../');
// var assert = require('assert'),
// request = require('request'),
// vows = require('vows'),
// union = require('../');

vows.describe('union/header').addBatch({
'When using `union`': {
'with a server that responds with a header': {
topic: function () {
var callback = this.callback;
var server = union.createServer({
before: [
function (req, res) {
res.on('header', function () {
callback(null, res);
});
res.writeHead(200, { 'content-type': 'text' });
res.end();
}
]
});
server.listen(9092, function () {
request('http://localhost:9092/');
});
},
'it should have proper `headerSent` set': function (err, res) {
assert.isNull(err);
assert.isTrue(res.headerSent);
},
'it should have proper `_emittedHeader` set': function (err, res) {
assert.isNull(err);
assert.isTrue(res._emittedHeader);
}
}
}
}).export(module);
// vows.describe('union/header').addBatch({
// 'When using `union`': {
// 'with a server that responds with a header': {
// topic: function () {
// var callback = this.callback;
// var server = union.createServer({
// before: [
// function (req, res) {
// res.on('header', function () {
// callback(null, res);
// });
// res.writeHead(200, { 'content-type': 'text' });
// res.end();
// }
// ]
// });
// server.listen(9092, function () {
// request('http://localhost:9092/');
// });
// },
// 'it should have proper `headerSent` set': function (err, res) {
// assert.isNull(err);
// assert.isTrue(res.headerSent);
// },
// 'it should have proper `_emittedHeader` set': function (err, res) {
// assert.isNull(err);
// assert.isTrue(res._emittedHeader);
// }
// }
// }
// }).export(module);

0 comments on commit b4dcb4f

Please sign in to comment.