Lines Matching refs:res
10 function test(res, header, code) {
12 res.writeHead(header);
20 const server = http.Server(common.mustCall(function(req, res) {
23 test(res, -1, '-1');
26 test(res, Infinity, 'Infinity');
29 test(res, NaN, 'NaN');
32 test(res, {}, '{}');
35 test(res, 99, '99');
38 test(res, 1000, '1000');
41 test(res, '1000', '1000');
44 test(res, null, 'null');
47 test(res, true, 'true');
50 test(res, [], '[]');
53 test(res, 'this is not valid', 'this is not valid');
56 test(res, '404 this is not valid either', '404 this is not valid either');
59 assert.throws(() => { res.writeHead(); },
70 res.statusCode = 200;
71 res.end();
80 }, (res) => {
81 assert.strictEqual(res.statusCode, 200);
82 res.on('end', () => {
88 res.resume();