You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using chai subset in some tests which compare the output from a directory listing. Under Linux, the tests were passing fine, but under Windows (win10), the comparison was failing. The issue turned out to be due to an ordering problem.
It seems that order within containsSubset does not matter under Linux, but does matter under win32. To fix the issue, I altered the ordering within the test and it works on both platforms. As this is different behavior based on platform differences (node vesions and chai/mocha vesions the same), I thought it should be reported.
Example
The following test was passing on Linux, but failing on win32
I'm using chai subset in some tests which compare the output from a directory listing. Under Linux, the tests were passing fine, but under Windows (win10), the comparison was failing. The issue turned out to be due to an ordering problem.
It seems that order within containsSubset does not matter under Linux, but does matter under win32. To fix the issue, I altered the ordering within the test and it works on both platforms. As this is different behavior based on platform differences (node vesions and chai/mocha vesions the same), I thought it should be reported.
Example
The following test was passing on Linux, but failing on win32
but changing it to the following and the test works on both platforms
Node version 12.14.1
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"chai-subset": "^1.6.0",
"mocha": "^7.0.0",
The text was updated successfully, but these errors were encountered: