-
Notifications
You must be signed in to change notification settings - Fork 533
noUiSlider unit test #44
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
noUiSlider unit test #44
Conversation
Thanks. Good solution. Btw, what we test in this external fields: #40 (comment) |
}); | ||
|
||
} else { | ||
this.skip(); |
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.
Travis failed. Missing done()
Your name doesn't visible in contributors page. https://github.com/icebob/vue-form-generator/graphs/contributors
I think maybe your commits are in a separated branches instead of master of your fork. What do you think? |
I've skipped a lot of test, noUiSlider is a bit weird... |
Ok, but I write some comment to your commit, ok? |
done(); | ||
}); | ||
} else { | ||
this.skip(); |
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.
I think here, we throw an exception if noUISlider is not loaded instead of skip
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.
Should I do something like this ?
if (typeof(window.noUiSlider) === 'object')
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.
No, the check is good, but change the this.skip()
to throw new Exception("Library is not loaded");
…ue-form-generator into LB_noUiSlider_unit_test
🚧 WIP
I'm able to wait for the initialization of noUiSlider thanks to these slides (n°9 was key).
By appending the
vm
to the document, it triggerready
, which initialize noUiSlider.Then, I use
vm.$nextTick()
to make sure noUiSlider had the time to do it's business (transforming a simple div into a nice slider), ready to test things !For now, nothing important is tested. This was just to show you this solution to test with external libs.