Skip to content

write tests that assert the markers are shown or hidden as in the new example code! #45

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

Closed
sagarpreet-chadha opened this issue Feb 21, 2019 · 1 comment

Comments

@sagarpreet-chadha
Copy link
Collaborator

Hi @jywarren ,

Can you give some examples from other repositories ? (similar examples would also work 😄 !)

Thank you 🎈 !

@jywarren
Copy link
Member

Sure! Jasmine is nice for this kind of testing - you can use jQuery to count elements at different stages:

https://github.com/publiclab/inline-markdown-editor/blob/e2b0c19e1075b475d015df429f1b10f0b6a9ef20/spec/javascripts/replacement_spec.js#L14-L32

Take a look and it'd allow us to manipulate the map and then at different moments, check for the existence or styling (using $('selector').hasClass('myClass');) of different HTML elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants