add failing test

This commit is contained in:
erik-krogh
2022-11-03 11:04:04 +01:00
parent 8502939b65
commit 94e864e933
2 changed files with 15 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
(function () {
function Foobar() {}
Foobar.prototype = {
method: function (obj, path, value) {
obj[path[0]][path[1]] = value; // NOT OK - but not flagged [INCONSISTENCY]
},
};
module.exports.foobar = Foobar;
})();

View File

@@ -1,3 +1,6 @@
module.exports.set = function (obj, path, value) {
obj[path[0]][path[1]] = value; // NOT OK
}
}
var other = require('./other')
exports.foobar = other.foobar;