Tests: more Node.js tests.
This commit is contained in:
16
test/node/promise_end/app.js
Executable file
16
test/node/promise_end/app.js
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var fs = require('fs');
|
||||
|
||||
require('unit-http').createServer(function (req, res) {
|
||||
res.write('blah');
|
||||
|
||||
Promise.resolve().then(() => {
|
||||
res.end();
|
||||
});
|
||||
|
||||
req.on('data', (data) => {
|
||||
fs.appendFile('callback', '', function() {});
|
||||
});
|
||||
|
||||
}).listen(7080);
|
||||
Reference in New Issue
Block a user