Rich-Harris / esrap

Parse in reverse
MIT License
54 stars 4 forks source link

Tests failing (inconsistent new line handling) #11

Closed manuel3108 closed 3 months ago

manuel3108 commented 3 months ago

After checking out and running bun test i get 6 successful tests and 45 fails. After digging through the logs it looks like most of the tests are failing because of inconsistencies between \r\n and \n. I was not able to figure out what was actually happening and did not find a viable fix.

I had a look at the bun testing docs and did not see any guidance on using file snapshots. At least for my local testing I switched to vitest and also added the ui package, which I find is a huge help. After minor code modifications I had 3 test failings because of new lines. This switch apparently also solves all the new line inconsistencies.

I have opened a PR in case you are interested.