Tests: fixed test_node_application_write_callback.
Fixed the write() callback order test. Also introduced a separate test to verify the callback call itself.
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var fs = require('fs');
|
||||
|
||||
require('unit-http').createServer(function (req, res) {
|
||||
res.writeHead(200, {'Content-Type': 'text/plain'});
|
||||
var a = 'blah';
|
||||
var a = 'world';
|
||||
res.write('hello', 'utf8', function() {
|
||||
a = 'world';
|
||||
a = 'blah';
|
||||
fs.appendFile('callback', '', function() {});
|
||||
});
|
||||
res.end(a);
|
||||
}).listen(7080);
|
||||
|
||||
Reference in New Issue
Block a user