freeCodeCamp/curriculum/test/utils/comment-to-data.js
Oliver Eyton-Williams 793fa8fb52 test: check replaced iff translatable comment
All translatable comments should be replaced, but nothing else.
2020-10-22 03:18:13 +05:30

10 lines
179 B
JavaScript

function commentToData(file, comment) {
if (file.data[comment]) {
file.data[comment]++;
} else {
file.data[comment] = 1;
}
}
exports.commentToData = commentToData;