freeCodeCamp / publish

> Content backend platform for /news
https://publish.freecodecamp.org
BSD 3-Clause "New" or "Revised" License
10 stars 9 forks source link

fix(test): update editor test to use keypresses #422

Closed ojeytonwilliams closed 5 months ago

ojeytonwilliams commented 5 months ago

Checklist:

We're interested in checking how the editor responds to keypresses, so I think it's safer to apply keypresses directly (rather than treating it like an input element).

I also simplified the logic a bit: computing the number of words seemed redundant when we know it's two.