Skip to content

Commit a08db57

Browse files
committed
opt.
1 parent 7c40365 commit a08db57

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/rules/no-identical-tests.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ module.exports = {
5454
}
5555

5656
// convert array to object
57-
const paObj = pa.reduce((result, item) => {
57+
const paObj = Object.create(null);
58+
pa.forEach(item => {
5859
const code = sourceCode.getText(item);
59-
result[code] = true;
60-
return result;
61-
}, {});
60+
paObj[code] = true;
61+
});
6262

6363
for (let i = 0; i < pb.length; i++) {
6464
const code = sourceCode.getText(pb[i]);

0 commit comments

Comments
 (0)