Skip to content

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

Merged
merged 19 commits into from
Aug 24, 2016

Conversation

lionel-bijaoui
Copy link
Member

🚧 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 trigger ready, 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.

@icebob
Copy link
Member

icebob commented Aug 23, 2016

Thanks. Good solution.

Btw, what we test in this external fields: #40 (comment)

});

} else {
this.skip();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Travis failed. Missing done()

@icebob
Copy link
Member

icebob commented Aug 23, 2016

Your name doesn't visible in contributors page. https://github.com/icebob/vue-form-generator/graphs/contributors

Contributions to master, excluding merge commits

I think maybe your commits are in a separated branches instead of master of your fork. What do you think?

@lionel-bijaoui
Copy link
Member Author

I've skipped a lot of test, noUiSlider is a bit weird...

@icebob
Copy link
Member

icebob commented Aug 23, 2016

Ok, but I write some comment to your commit, ok?

@coveralls
Copy link

coveralls commented Aug 23, 2016

Coverage Status

Coverage increased (+1.3%) to 81.182% when pulling dfef1f1 on lionel-bijaoui:LB_noUiSlider_unit_test into 91f9317 on icebob:master.

done();
});
} else {
this.skip();
Copy link
Member

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

Copy link
Member Author

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')

Copy link
Member

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");

@coveralls
Copy link

coveralls commented Aug 23, 2016

Coverage Status

Coverage increased (+1.3%) to 81.182% when pulling 136b112 on lionel-bijaoui:LB_noUiSlider_unit_test into 91f9317 on icebob:master.

@coveralls
Copy link

coveralls commented Aug 24, 2016

Coverage Status

Coverage increased (+1.3%) to 81.182% when pulling a2665dd on lionel-bijaoui:LB_noUiSlider_unit_test into 91f9317 on icebob:master.

@icebob icebob merged commit a2665dd into vue-generators:master Aug 24, 2016
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

Successfully merging this pull request may close these issues.

3 participants