82 });
83
84 test("sendMessage no connection", async () => {
85 // TODO: how to be sure that connection is closed86
87 const received = await socket.sendMessage();
88 if (received) {
65 });
66
67 test("sendDebugMessage", async () => {
68 // TODO: how to be sure that connection is closed69 const received = await socket.sendDebugMessage();
70 assert.strictEqual(received.error, true);
71 assert.strictEqual(received.message, "Connection refused");
49
50 test("Change network address when enableConnection is true", async () => {
51 // TODO: should call Promise.all. but it doesn't work
52 // XXX: check why NukeServerSocket workspace had this settings. 53 await utils.updateConfig("network.enableManualConnection", true);
54 await utils.updateConfig("network.host", "192.186.1.00");
55 await utils.updateConfig("network.port", "55555");
48 });
49
50 test("Change network address when enableConnection is true", async () => {
51 // TODO: should call Promise.all. but it doesn't work 52 // XXX: check why NukeServerSocket workspace had this settings.
53 await utils.updateConfig("network.enableManualConnection", true);
54 await utils.updateConfig("network.host", "192.186.1.00");
38 });
39
40 test("Changing network addresses should not work if enableConnection is false", async () => {
41 // TODO: should call Promise.all. but it doesn't work 42 await utils.updateConfig("network.enableManualConnection", false);
43 await utils.updateConfig("network.host", "192.136.1.99");
44 await utils.updateConfig("network.port", "99999");
Developers often add comments to code that is not complete or needs review. You probably want to fix or review the code and then remove the comments before considering the code to be production-ready. Issues are raised whenever our analyzer finds these keywords in the comments i.e., TODO, FIXME, XXX.
// TODO: do something
// FIXME: this is not a good idea
// default - { "terms": ["todo", "fixme", "xxx"], "location": "start" }
function callback(err, results) {
if (err) {
console.error(err);
return;
}
// TODO
}
// default - { "terms": ["todo", "fixme", "xxx"], "location": "start" }
function callback(err, results) {
if (err) {
console.error(err);
return;
}
// NOT READY FOR PRIME TIME
// but too bad, it is not a predefined warning term
}