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

Update sortOrder message #403

Closed
wants to merge 1 commit into from
Closed

Update sortOrder message #403

wants to merge 1 commit into from

Conversation

NikolayFrantsev
Copy link
Contributor

@NikolayFrantsev NikolayFrantsev commented Feb 22, 2017

Hey.

Current message of sortOrder check is useless, since it's hard to understand correct properties order.
I updated message with useful hint to help ordering properties.

@SimenB
Copy link
Owner

SimenB commented Feb 25, 2017

@Shutnik Could you add a test for this?

It's mostly to ensure I don't break it when refactoring later 😄

Copy link
Owner

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

Missing test

@NikolayFrantsev
Copy link
Contributor Author

@SimenB I checked /test/test.js and seems there are no examples for testing message formats. Can you please suggest me way to write tests for current case?

@SimenB
Copy link
Owner

SimenB commented Feb 26, 2017

@Shutnik Easiest would be to spy on app.msg and assert it was called with the correct message.

I threw together an example in the v2 branch for you.

5e373b8

If you wanna make the PR out to v2 instead, I would prefer that 😄 Both works, though! If you don't want to, you can spy and assert with Sinon on the master branch.

I'm currently rewriting how rules report (#356), after which tests for messages will be much cleaner.

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

2 participants