Skip to content

Commit 9b7d062

Browse files
committed
Vendored pnpm integration tests
1 parent 1a1b7ee commit 9b7d062

File tree

588 files changed

+85909
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

588 files changed

+85909
-1
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@
88
/pkg/
99
!vendor/**
1010
build
11-
node_modules
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
var logfmt = require('../logfmt'),
2+
assert = require('assert');
3+
4+
var OutStream = require('./outstream');
5+
6+
suite('logfmt.log', function() {
7+
test("passing location as second param", function(){
8+
var mock_sink = new OutStream;
9+
var data = {foo: 'bar', a: 14}
10+
logfmt.log(data, mock_sink);
11+
assert.equal("foo=bar a=14\n", mock_sink.logline)
12+
})
13+
14+
test("setting sink at object level", function(){
15+
var mock_sink = new OutStream;
16+
var data = {foo: "hello kitty"}
17+
var stream = logfmt.stream;
18+
logfmt.stream = mock_sink;
19+
logfmt.log(data);
20+
assert.equal("foo=\"hello kitty\"\n", mock_sink.logline)
21+
logfmt.stream = stream;
22+
})
23+
})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--ui qunit
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
var it = require('it-is').style('colour')
2+
, split = require('..')
3+
4+
exports ['emit mapper exceptions as error events'] = function (test) {
5+
var s = split(JSON.parse)
6+
, caughtError = false
7+
, rows = []
8+
9+
s.on('error', function (err) {
10+
caughtError = true
11+
})
12+
13+
s.on('data', function (row) { rows.push(row) })
14+
15+
s.write('{"a":1}\n{"')
16+
it(caughtError).equal(false)
17+
it(rows).deepEqual([ { a: 1 } ])
18+
19+
s.write('b":2}\n{"c":}\n')
20+
it(caughtError).equal(true)
21+
it(rows).deepEqual([ { a: 1 }, { b: 2 } ])
22+
23+
s.end()
24+
test.done()
25+
}
26+
27+
exports ['mapper error events on trailing chunks'] = function (test) {
28+
var s = split(JSON.parse)
29+
, caughtError = false
30+
, rows = []
31+
32+
s.on('error', function (err) {
33+
caughtError = true
34+
})
35+
36+
s.on('data', function (row) { rows.push(row) })
37+
38+
s.write('{"a":1}\n{"')
39+
it(caughtError).equal(false)
40+
it(rows).deepEqual([ { a: 1 } ])
41+
42+
s.write('b":2}\n{"c":}')
43+
it(caughtError).equal(false)
44+
it(rows).deepEqual([ { a: 1 }, { b: 2 } ])
45+
46+
s.end()
47+
it(caughtError).equal(true)
48+
it(rows).deepEqual([ { a: 1 }, { b: 2 } ])
49+
50+
test.done()
51+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
0.2.0 / 2013-08-11
3+
==================
4+
5+
* fix: return false for no-cache
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#! /usr/bin/env node
2+
3+
app = require('./express_buffered');
4+
var http = require('http');
5+
6+
var options = {
7+
hostname: 'localhost',
8+
port: 3000,
9+
path: '/logs',
10+
method: 'POST',
11+
headers: {
12+
'Content-Type':'application/logplex-1'
13+
}
14+
};
15+
16+
var req = http.request(options, function(res) {
17+
console.log('STATUS: ' + res.statusCode);
18+
console.log('HEADERS: ' + JSON.stringify(res.headers));
19+
res.setEncoding('utf8');
20+
res.on('data', function (chunk) {
21+
console.log('BODY: ' + chunk);
22+
});
23+
res.on('end', function(){
24+
console.log('end of request')
25+
process.exit(0);
26+
})
27+
});
28+
29+
req.on('error', function(e) {
30+
console.log('problem with request: ' + e.message);
31+
});
32+
33+
// write data to request body
34+
req.write('foo=bar a=14 baz="hello kitty" cool%story=bro f %^asdf\n');
35+
req.write('at=error code=H12 desc="Request timeout" method=GET path=/users/user38948@heroku.com/usage/2013-05-01T00:00:00Z/2013-05-01T00:00:00Z?exclude=platform%3Adyno%3Aphysical host=vault-usage-read.herokuapp.com fwd="50.17.15.69" dyno=web.21 connect=17ms service=30000ms status=503 bytes=0\n');
36+
37+
req.end();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "type-is",
3+
"description": "Infer the content type if a request",
4+
"version": "1.0.0",
5+
"author": {
6+
"name": "Jonathan Ong",
7+
"email": "me@jongleberry.com",
8+
"url": "http://jongleberry.com",
9+
"twitter": "https://twitter.com/jongleberry"
10+
},
11+
"license": "MIT",
12+
"repository": {
13+
"type": "git",
14+
"url": "https://github.com/expressjs/type-is.git"
15+
},
16+
"bugs": {
17+
"mail": "me@jongleberry.com",
18+
"url": "https://github.com/expressjs/type-is/issues"
19+
},
20+
"dependencies": {
21+
"mime": "~1.2.11"
22+
},
23+
"devDependencies": {
24+
"mocha": "*",
25+
"should": "*"
26+
},
27+
"scripts": {
28+
"test": "make test"
29+
}
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
(function() {
2+
var configuration, preferredCharsets, testConfigurations, testCorrectCharset, _i, _len,
3+
_this = this;
4+
5+
preferredCharsets = require('../lib/charset').preferredCharsets;
6+
7+
this["Should not return a charset when no charset is provided"] = function(test) {
8+
test.deepEqual(preferredCharsets('*', []), []);
9+
return test.done();
10+
};
11+
12+
this["Should not return a charset when no charset is acceptable"] = function(test) {
13+
test.deepEqual(preferredCharsets('ISO-8859-1', ['utf-8']), []);
14+
return test.done();
15+
};
16+
17+
this["Should not return a charset with q = 0"] = function(test) {
18+
test.deepEqual(preferredCharsets('utf-8;q=0', ['utf-8']), []);
19+
return test.done();
20+
};
21+
22+
testCorrectCharset = function(c) {
23+
return _this["Should return " + c.selected + " for accept-charset header " + c.accept + " with provided charset " + c.provided] = function(test) {
24+
test.deepEqual(preferredCharsets(c.accept, c.provided), c.selected);
25+
return test.done();
26+
};
27+
};
28+
29+
testConfigurations = [
30+
{
31+
accept: 'utf-8',
32+
provided: ['utf-8'],
33+
selected: ['utf-8']
34+
}, {
35+
accept: '*',
36+
provided: ['utf-8'],
37+
selected: ['utf-8']
38+
}, {
39+
accept: 'utf-8',
40+
provided: ['utf-8', 'ISO-8859-1'],
41+
selected: ['utf-8']
42+
}, {
43+
accept: 'utf-8, ISO-8859-1',
44+
provided: ['utf-8'],
45+
selected: ['utf-8']
46+
}, {
47+
accept: 'utf-8;q=0.8, ISO-8859-1',
48+
provided: ['utf-8', 'ISO-8859-1'],
49+
selected: ['ISO-8859-1', 'utf-8']
50+
}, {
51+
accept: 'utf-8;q=0.8, ISO-8859-1',
52+
provided: null,
53+
selected: ['ISO-8859-1', 'utf-8']
54+
}
55+
];
56+
57+
for (_i = 0, _len = testConfigurations.length; _i < _len; _i++) {
58+
configuration = testConfigurations[_i];
59+
testCorrectCharset(configuration);
60+
}
61+
62+
}).call(this);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "split",
3+
"version": "0.2.10",
4+
"description": "split a Text Stream into a Line Stream",
5+
"homepage": "http://github.com/dominictarr/split",
6+
"repository": {
7+
"type": "git",
8+
"url": "git://github.com/dominictarr/split.git"
9+
},
10+
"dependencies": {
11+
"through": "2"
12+
},
13+
"devDependencies": {
14+
"asynct": "*",
15+
"it-is": "1",
16+
"ubelt": "~2.9",
17+
"stream-spec": "~0.2",
18+
"event-stream": "~3.0.2"
19+
},
20+
"scripts": {
21+
"test": "asynct test/"
22+
},
23+
"author": "Dominic Tarr <dominic.tarr@gmail.com> (http://bit.ly/dominictarr)",
24+
"optionalDependencies": {},
25+
"engines": {
26+
"node": "*"
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
2+
# node-range-parser
3+
4+
Range header field parser.
5+
6+
## Example:
7+
8+
```js
9+
assert(-1 == parse(200, 'bytes=500-20'));
10+
assert(-2 == parse(200, 'bytes=malformed'));
11+
parse(200, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 199 }]));
12+
parse(1000, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 499 }]));
13+
parse(1000, 'bytes=40-80').should.eql(arr('bytes', [{ start: 40, end: 80 }]));
14+
parse(1000, 'bytes=-500').should.eql(arr('bytes', [{ start: 500, end: 999 }]));
15+
parse(1000, 'bytes=-400').should.eql(arr('bytes', [{ start: 600, end: 999 }]));
16+
parse(1000, 'bytes=500-').should.eql(arr('bytes', [{ start: 500, end: 999 }]));
17+
parse(1000, 'bytes=400-').should.eql(arr('bytes', [{ start: 400, end: 999 }]));
18+
parse(1000, 'bytes=0-0').should.eql(arr('bytes', [{ start: 0, end: 0 }]));
19+
parse(1000, 'bytes=-1').should.eql(arr('bytes', [{ start: 999, end: 999 }]));
20+
parse(1000, 'items=0-5').should.eql(arr('items', [{ start: 0, end: 5 }]));
21+
parse(1000, 'bytes=40-80,-1').should.eql(arr('bytes', [{ start: 40, end: 80 }, { start: 999, end: 999 }]));
22+
```
23+
24+
## Installation
25+
26+
```
27+
$ npm install range-parser
28+
```
29+
30+
## License
31+
32+
(The MIT License)
33+
34+
Copyright (c) 2012 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
35+
36+
Permission is hereby granted, free of charge, to any person obtaining
37+
a copy of this software and associated documentation files (the
38+
'Software'), to deal in the Software without restriction, including
39+
without limitation the rights to use, copy, modify, merge, publish,
40+
distribute, sublicense, and/or sell copies of the Software, and to
41+
permit persons to whom the Software is furnished to do so, subject to
42+
the following conditions:
43+
44+
The above copyright notice and this permission notice shall be
45+
included in all copies or substantial portions of the Software.
46+
47+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
48+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
49+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
50+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
51+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
52+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
53+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)