Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing Framework: Test search queries #9

Open
sschmidTU opened this issue Nov 8, 2020 · 0 comments
Open

Testing Framework: Test search queries #9

sschmidTU opened this issue Nov 8, 2020 · 0 comments
Labels
help wanted potentially good issue for volunteer contributors testing all about testing, tests, test frameworks, etc

Comments

@sschmidTU
Copy link
Owner

sschmidTU commented Nov 8, 2020

Use a testing framework (e.g. mocha or karma) to test the search automatically.

example tests with mode, search terms, kanji that should be found:

wk,coffin sun,者
rtk,old man sun,者
wk,mustache scooter,過&適

For that, set wtk_search(query, {updateHTMLElements: false}.
(of course we can also add browser testing where it tests interacting with HTML elements, but one step at a time)

Maybe also integrate the tests into the build / continuous integration (Github actions, so that the build only passes if the tests pass).

This could also be a nice issue for volunteer contributors.

@sschmidTU sschmidTU added help wanted potentially good issue for volunteer contributors testing all about testing, tests, test frameworks, etc labels Nov 8, 2020
sschmidTU pushed a commit that referenced this issue Nov 9, 2020
search returns a results object with
a length property and a property for
each kanji found,
and a list with ordered search results.

search function is now decoupled
from html elements, so you can
use the search function without a browser.

This is also a prerequisite
to enable testing (#9).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted potentially good issue for volunteer contributors testing all about testing, tests, test frameworks, etc
Projects
None yet
Development

No branches or pull requests

1 participant