- Operating System: Ubuntu 16.04
- Cypress Version: 1.0.3
- Browser Version: N/A
Is this a Feature or Bug?
Bug
Current behavior:
Whenever I run a test using a json fixture, the fixture file gets formatted. In my project I format all possible files using prettier. This includes json. The formatting that cypress applies conflicts with prettier. Specifically empty object blocks. ({})
Desired behavior:
Ideal: Format using prettier instead of whatever is used now.
Acceptable: Don't format fixtures.
How to reproduce:
- Create a test using a json fixture with the contents formatted by prettier.
Example:
https://prettier.io/playground/#N4Igxg9gdgLgprEAuEwA6UAEm3mgMwEsBzXJTdKDbAXwBocscR8IIzLttcAjAQwBOZTAEZqmGhhog6ICAAcYhaAGdkoPipjJ8fADYq4sngL5gA1nBgBleWcJRiyGAICuRkABMIYHfsOyAFYqAB4AQqYWVtZ8ALZwADIOcH4GHhCuMPKZAEypASB2AoYCyCDB0DKFAg4wAOqEnjAAFsgAHAAMsoaxhM5uHioOxHpwAIquEPD5HjB8PA1NrUg5si58hHrDAMIQsbF8ZVDQKbKuhgAq82pIumk0NEA
- Run the test.
- Check the file for format differences.
Test code:
See https://github.com/Graham42/cypress-bug-format-fixures
Is this a Feature or Bug?
Bug
Current behavior:
Whenever I run a test using a json fixture, the fixture file gets formatted. In my project I format all possible files using prettier. This includes json. The formatting that cypress applies conflicts with prettier. Specifically empty object blocks. (
{})Desired behavior:
Ideal: Format using prettier instead of whatever is used now.
Acceptable: Don't format fixtures.
How to reproduce:
Example:
https://prettier.io/playground/#N4Igxg9gdgLgprEAuEwA6UAEm3mgMwEsBzXJTdKDbAXwBocscR8IIzLttcAjAQwBOZTAEZqmGhhog6ICAAcYhaAGdkoPipjJ8fADYq4sngL5gA1nBgBleWcJRiyGAICuRkABMIYHfsOyAFYqAB4AQqYWVtZ8ALZwADIOcH4GHhCuMPKZAEypASB2AoYCyCDB0DKFAg4wAOqEnjAAFsgAHAAMsoaxhM5uHioOxHpwAIquEPD5HjB8PA1NrUg5si58hHrDAMIQsbF8ZVDQKbKuhgAq82pIumk0NEA
Test code:
See https://github.com/Graham42/cypress-bug-format-fixures