Open
Description
This should be an valid case (but is currently invalid):
function sharedBehavior() {
module('moduleName', function () {});
}
module('moduleName', function () {}); // This is erroneously considered a violation.
This should be an valid case (but is currently invalid):
export default {
desktop() {
module('hourly chart', function () {});
},
mobile() {
module('hourly chart', function () {});
},
};
This should be an valid case (but is currently invalid):
if (foo) {
module('module1', function () {});
} else {
module('module1', function () {});
}
Additional test cases that should be added:
module("name1", function() {
function sharedBehavior() {
module("name1", function() {}); // This is fine since it's in its own scope.
};
module("name1", function() {}); // This is the violation.
});
function sharedBehavior() {
module("name1", function() {});
module("name1", function() {}); // This is the violation.
};