Tests: Node.js application tests.
This commit is contained in:
12
test/node/mirror/app.js
Executable file
12
test/node/mirror/app.js
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
require('unit-http').createServer(function (req, res) {
|
||||
let body = '';
|
||||
req.on('data', chunk => {
|
||||
body += chunk.toString();
|
||||
});
|
||||
req.on('end', () => {
|
||||
res.writeHead(200, {'Content-Length': Buffer.byteLength(body)});
|
||||
res.end(body);
|
||||
});
|
||||
}).listen(7080);
|
||||
Reference in New Issue
Block a user