Logo
Explore Help
Sign In
1berry/nodejs
1
0
Fork 0
You've already forked nodejs
Code Issues Packages Projects Releases Wiki Activity
nodejs/test/parallel/test-cli-eval-event.js

16 lines
438 B
JavaScript
Raw Normal View History

src: fix deferred events not working with -e Defer evaluation of the script for a tick. This is a workaround for events not firing when evaluating scripts on the command line with -e. Fixes: https://github.com/nodejs/io.js/issues/1600 PR-URL: https://github.com/nodejs/io.js/pull/1793 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-05-25 16:37:49 +02:00
'use strict';
const common = require('../common');
const assert = require('assert');
const spawn = require('child_process').spawn;
const child = spawn(process.execPath, ['-e', `
const server = require('net').createServer().listen(0);
server.once('listening', server.close);
`]);
child.once('exit', common.mustCall(function(exitCode, signalCode) {
test: use strictEqual in test-cli-eval-event.js PR-URL: https://github.com/nodejs/node/pull/9964 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-12-01 10:56:07 -06:00
assert.strictEqual(exitCode, 0);
assert.strictEqual(signalCode, null);
src: fix deferred events not working with -e Defer evaluation of the script for a tick. This is a workaround for events not firing when evaluating scripts on the command line with -e. Fixes: https://github.com/nodejs/io.js/issues/1600 PR-URL: https://github.com/nodejs/io.js/pull/1793 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-05-25 16:37:49 +02:00
}));
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 5601ms Template: 8ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API