-
Notifications
You must be signed in to change notification settings - Fork 13
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
[WIP] Unit tests from API Documentation #49
base: master
Are you sure you want to change the base?
Conversation
The documentation will lead the unit tests, so that's why I need answers for the questions I did at #46:
|
e997c58
to
4a4bc12
Compare
The TextArea object has alot of methods available to it. Some of them are defined directly here in TextArea More methods available on the TextArea object are defined here - Commands |
Actually the commands are returning the jQuery object (not the TextArea object). As seen at ced8f6e |
@leobalter, what happens is that the command itself does not return anything (returns undefined) but it gets put in an array and wrapped in a jQuery object (see here). So what we get is a jQuery object that only contains undefined. This might not be the API we want (it might be better to have the command return the original object so we can chain) but that's what's happening now. |
And that's what we don't need to document. We don't need to say what the program is currently doing, but what it should be doing. That's where we're going to know where to do the code refactoring. |
I committed some initial commented files. @gshenar and I are actively working on this and will be adding more as we go. |
@chriskwan, your last commits mixed some tabs and spaces on the indentation. I fixed them but is good to keep track of them. Maybe setting your editor to show invisible characters might help. |
|
||
arte = this.element.Arte(); | ||
|
||
arte.text("foo"); |
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.
this is not possible, break the tests.
How can I add text via JS in my Arte elements?
I reverted the new unit tests as I'm writing then along with a huge refactoring on another branch. I'll squash this revert commit before merging. |
Fixes #45
This is based on #46 and the target of this PR is to identify the API features and build the documentation and tests for that.