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

consider using outerHTML in tests #4

Open
pawelpanasewicz opened this issue Sep 29, 2016 · 0 comments
Open

consider using outerHTML in tests #4

pawelpanasewicz opened this issue Sep 29, 2016 · 0 comments

Comments

@pawelpanasewicz
Copy link

In tests assertions are made using node.innerText.
Stronger assertions would be when comparing results on outerHTML level.

Consider below example:

val c = Var("")
val d = Var("")
val node = span(c, d).render
assert(node.textContent == "") //this assertion is weaker than the below one
assert(node.outerHTML == "<span></span>")

Asserting assert(node.outerHTML == "<span></span>" will tell much more about what happened.
Are there any particular reasons for not using it? Sorry, I don't have much experience with "DOM API" ...

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

No branches or pull requests

2 participants