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
Fixes #83: test case for text-parser #109
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent research on this. I hadn't known about the innerText
issue in jsdom. I agree that we can probably just use textContent
instead.
This looks like a good start, but can you update your tests to do a few things:
- include some HTML that would produce newlines (e.g.,
h1
andp
) and make sure they work as we'd expect. - assume that
textParser.run()
returns aPromise
vs. something we get back directly.
Hi @humphd , I have change the test to return a Promise by async await. I have noticed that dialogue.js has some errors whenever I run the test 'npm run test' |
@giatuongtran9 there is a PR to fix that in #106 if you want to review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR #106 fixes the linting errors in the dialogue.js file so you just need to rebase and resolve the path to module
@giatuongtran9 it looks like you've merged and pulled in a bunch of unrelated changes. Also, there are merge conflict markers in NOTE: you want to rebase but not merge with master. |
@humphd I made some mistakes at the beginning and try to rebase to master but somehow pulled all the new files. The test fail because we don't have the text-parser.js yet |
OK, we'll have to fix this git history. I can help you when we see each other at the start of the week, or you can try and do it yourself between now and then. As far as the failure, tell Jest to |
I will try to fix this but I think I will need your help. skip cannot be used here because the test need the run method from text-parser.js so we can comment out the test or do this for now:
|
OK @giatuongtran9, how about this. Since @PavanKKamra doesn't seem to have started his work yet, why don't you add @PavanKKamra how is your work coming? It sounds like we're just about ready for your code here... |
@humphd I have added simple function for text-parser and @PavanKKamra can continue from there |
ead7243
to
64197e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@giatuongtran9 you need to regenerate
|
@humphd Thank you and @cindyledev please review it again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff.
@cindyledev please review again, if you left it here, other stuff will get merged and this will forever get conflict and never get merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a big amount of unrelated changes here. Try to get rid of them.
author Tuong Tran <tuongtran@Tuongs-MacBook-Pro.local> 1573257565 -0500 committer Tuong Tran <tuongtran@Tuongs-MacBook-Pro.local> 1573498166 -0500 Fix Seneca-CDOT#83: Change test to async await
author Tuong Tran <tuongtran@Tuongs-MacBook-Pro.local> 1573257565 -0500 committer Tuong Tran <tuongtran@Tuongs-MacBook-Pro.local> 1573498166 -0500 Fix Seneca-CDOT#83: Change test to async await
235a76a
to
9cf0f7c
Compare
Adding test case for parsing html to text, reference to issue #75
@PavanKKamra, apparently JSOM does not support innetText, based on this Issue. I have tested it and innerHTML and textContent works fine but innerText will return 'undefined'