Closed paambaati closed 1 year ago
What's the length of both the expected and actual strings? My guess is that there's an invisible character somewhere.
@ljharb The strings are of the same length – https://github.com/paambaati/codeclimate-action/actions/runs/4905406445/jobs/8759167878#step:5:12
for (var i = 0; i < a.length; i++) { if (a[i] !== b[i]) { console.log(i, a[i], b[i]); } }
339 I i
340 N n
341 D d
342 O o
343 W w
344 S s
644 I i
645 N n
646 D d
647 O o
648 W w
649 S s
seems like there's some capitalization differences between the strings. Specifically, I see some WINDOWS
vs Windows
. Any chance you haven't looked into the case-sensitivity of the disks in question?
Lol, that was it. CI is green now – https://github.com/paambaati/codeclimate-action/actions/runs/4905472889/jobs/8759276954?pr=666. Thank you so much!
Looks like the root cause is that folder names are case-insensitive in Windows, and the machine I developed the tests on reported the path as C:\WINDOWS
, while the GitHub Actions runner machine reports it as C:\Windows
.
That suggests they're not always case-insensitve in windows :-p glad you figured it out tho.
This is one of the strangest bugs I've come across, but my tape tests fail only on Windows, and only on
t.equals
comparisons of identical strings.See https://github.com/paambaati/codeclimate-action/actions/runs/4900505606/jobs/8751202125?pr=666 for an example.
I've made sure to account for line-endings.
Any clue why this might be happening?