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

VueMultiSelect unit test #46

Merged

Conversation

lionel-bijaoui
Copy link
Member

I based myself on fieldSelect and remove some test that made no sense for this fields (it doesn't have a value property).
I'm waiting for your comments.

@coveralls
Copy link

coveralls commented Aug 24, 2016

Coverage Status

Coverage increased (+1.5%) to 81.4% when pulling 4c7c717 on lionel-bijaoui:LB_vueMultiSelect_unit_test into 4ab7a8e on icebob:master.


vm.$nextTick( () => {
expect(model.city[0]).to.be.equal("Paris");
done();
Copy link
Member

Choose a reason for hiding this comment

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

It's not too precize. Please check the model.city.length to be 1

@icebob
Copy link
Member

icebob commented Aug 24, 2016

Good PR, thank you. I wrote my comments, if you fix them, I can merge it :)

// });

it.skip("model value should be the handle value after changed", (done) => {
vm.$nextTick( () => {
Copy link
Member

Choose a reason for hiding this comment

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

What's the problem with skipped tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm following mocha documentation. It is better to skip a test than comment it.

Best practice: Use .skip() instead of commenting tests out.

As for why exactly I skipping them, there is a problem with the value.
Without vm.model = { rating: 10 };, the slider don't move (.noUi-origin css left value is 0%), the value is not set at all (part of the problem come form my mistake in the schema definition, but even when fixed, there is still a problem).
When placed in a before hook, the value is set properly.
When used in a it statement, I need to use a setTimeout inside the nextTick() to get the changes.

Copy link
Member

Choose a reason for hiding this comment

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

I will check too.

Copy link
Member

Choose a reason for hiding this comment

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

I trying to fix this test

@coveralls
Copy link

coveralls commented Aug 24, 2016

Coverage Status

Coverage increased (+1.5%) to 81.4% when pulling 09a41f0 on lionel-bijaoui:LB_vueMultiSelect_unit_test into 4ab7a8e on icebob:master.

@icebob
Copy link
Member

icebob commented Aug 24, 2016

Are you ready? Can be merge?

@lionel-bijaoui
Copy link
Member Author

Yes, it will certainly need more in the future, but this is honest.

@icebob icebob merged commit dcfde9f into vue-generators:master Aug 24, 2016
@lionel-bijaoui lionel-bijaoui deleted the LB_vueMultiSelect_unit_test branch August 24, 2016 13:24
icebob added a commit that referenced this pull request Aug 24, 2016
@icebob
Copy link
Member

icebob commented Aug 24, 2016

I fixed the noUiSlider unit test

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.

None yet

3 participants