sisoe24 / Nuke-Tools

Consider using dot notation JS-0303
Anti-pattern
Minor
5 months ago5 months old
["text"] is better written in dot notation
126            assert.ok(Object.prototype.hasOwnProperty.call(msg, "file"));
127
128            assert.strictEqual(msg["file"], tmpFile);
129            assert.strictEqual(msg["text"], "print");130        }
131    });
132});
["file"] is better written in dot notation
125            assert.ok(Object.prototype.hasOwnProperty.call(msg, "text"));
126            assert.ok(Object.prototype.hasOwnProperty.call(msg, "file"));
127
128            assert.strictEqual(msg["file"], tmpFile);129            assert.strictEqual(msg["text"], "print");
130        }
131    });
["text"] is better written in dot notation
108
109            assert.strictEqual(msg["file"], tmpFile);
110            assert.strictEqual(msg["text"], "print('hello world')");
111            assert.strictEqual(msg["text"], editor.document.getText());112        }
113    });
114
["text"] is better written in dot notation
107            assert.ok(Object.prototype.hasOwnProperty.call(msg, "file"));
108
109            assert.strictEqual(msg["file"], tmpFile);
110            assert.strictEqual(msg["text"], "print('hello world')");111            assert.strictEqual(msg["text"], editor.document.getText());
112        }
113    });
["file"] is better written in dot notation
106            assert.ok(Object.prototype.hasOwnProperty.call(msg, "text"));
107            assert.ok(Object.prototype.hasOwnProperty.call(msg, "file"));
108
109            assert.strictEqual(msg["file"], tmpFile);110            assert.strictEqual(msg["text"], "print('hello world')");
111            assert.strictEqual(msg["text"], editor.document.getText());
112        }