Closed sz-hankus closed 2 years ago
I can see that some tests have failed, saying ERROR: Coverage for lines (97.95%) does not meet global threshold (100%)
.
But when I cloned the original repo without my changes, the error was still there when I ran npm run test
. Should I change something?
You should be able to run tap --coverage-report=html
to get an overview of the missing coverage. I'll try to find some time to examine the coverage on the master branch soon. It should be 100%.
It seems that the problematic part is line 64 in search.js
It's kind of hard to test, because in order for a test to reach this line, emojiDetails
need to be undefined. But from what I've tested, emojiInfo[char]
is always defined for all emojis (at least on my system).
The obvious solution would be to add alfredItem
to the module exports and just test it by directly calling it with undefined as arguments, but I'm pretty sure that it's not the prettiest solution.
The obvious solution would be to add
alfredItem
to the module exports and just test it by directly calling it with undefined as arguments, but I'm pretty sure that it's not the prettiest solution.
That's totally fine. Would you like to submit a PR that adds the following, along with a test, to the end of search.js
?:
module.exports.internals = {
alfredItem
}
Sure, I'll get on it.
I think it should be ready to merge now
The only changes besides the readmes and such is adding the codepoint for each emoji to
'unicode-emoji-json'
ingenpack.js
. In order to avoid representing e.g. 5️⃣ as "U+35", I also wrote a function that adds leading zeroes to the codepoint so that the output looks as follows: "U+0035".Here's a screenshot of the feature in action:
Let me know what you think :)