node-casbin icon indicating copy to clipboard operation
node-casbin copied to clipboard

CasbinJsGetPermissionForUser's Test Failing

Open Shivansh-yadav13 opened this issue 3 years ago • 6 comments

CasbinJsGetPermissionForUser's Test Failing in frontend.test.ts testfail

Shivansh-yadav13 avatar Jan 20 '22 14:01 Shivansh-yadav13

@Gabriel-403 @Zxilly @kingiw @nodece

casbin-bot avatar Jan 20 '22 14:01 casbin-bot

@hsluoyz do you know why is this happening?

Shivansh-yadav13 avatar Jan 21 '22 11:01 Shivansh-yadav13

@Gabriel-403 @Zxilly @kingiw @nodece

hsluoyz avatar Jan 21 '22 17:01 hsluoyz

@Shivansh-yadav13 The main reason is git checkout the source files line break to crlf (\r\n), but unit test hardcored \n. Since old casbin.js has been deprecated, I didn't fix it before.

Zxilly avatar Jan 21 '22 17:01 Zxilly

@Zxilly Should I close this issue since it happened with me only on another system

Shivansh-yadav13 avatar Jan 22 '22 09:01 Shivansh-yadav13

@Shivansh-yadav13 This is indeed a bug, but clearly not of high priority. Maybe it will be fixed later and we can use this issue to track it.

Zxilly avatar Jan 22 '22 09:01 Zxilly

@Shivansh-yadav13 The main reason is git checkout the source files line break to crlf (\r\n), but unit test hardcored \n. Since old casbin.js has been deprecated, I didn't fix it before.

The old Casbin.js should be fixed. All CRLF should be replaced by LF

hsluoyz avatar Jan 31 '23 14:01 hsluoyz

:tada: This issue has been resolved in version 5.23.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Feb 02 '23 12:02 github-actions[bot]