-
Notifications
You must be signed in to change notification settings - Fork 55
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
JSON comparison should ignore LF in comparisons #270
Comments
Easiest solution for shinytest is to use brio, replacing existing calls to |
brio isn't a viable solution because it always adds a trailing newline when writing. This is probably desired behaviour, but it's change from the current writer, so would invalidate all existing snapshots. |
This probably requires someone with a windows computer to figure out; I've given up (see my attempts in the attached PR). Alternatively, I think a better long term approach would be to read the JSON back into R and perform the comparisons with waldo. |
Are there any news on this?
While at the same time reporting a diff in every single json:
I am using portable R (4.1.2) and app + dev dependencies from MRAN date 28.02.2022. I am actually developing on windows for windows, however we might have to cover unix as well in the near future. Thank you for your effort! |
I spent some time to figure out, where the supposed diff was coming from and it turns out that fc.exe - the windows diff application - returns the correct exit code (i.e. no difference), while diff.exe from rtools detects some difference at the end of the JSON (I couldn't figure out what it is).
Best, |
Thanks a lot for this wonderful package.
I have used this to test a few shiny modules developed in my package. I have noticed a thing about json comparison which is described below
Problem : If I record the test and then push the same in GitHub
I'm getting messages like
Full log here
The tests are passed locally.
Then I clone the same GitHub project in another folder now the test fails
Here is a reproducible example
Created on 2019-07-31 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered: