Skip to content

Commit

Permalink
fix: avoid the impact of line breaks CRLF in frontend.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
imp2002 committed Feb 2, 2023
1 parent a03fb33 commit ae14c36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/frontend.test.ts
Expand Up @@ -27,7 +27,7 @@ test('TestCasbinJsGetPermissionForUser', async () => {
let expectedModelStr = readFileSync('examples/rbac_model.conf').toString();

// avoid the impact of line breaks changing to CRLF, when automatic conversion is enabled
expectedModelStr = expectedModelStr.replace(/\r/g, '\n')
expectedModelStr = expectedModelStr.replace(/\r/g, '\n');

expect(received['m']).toBe(expectedModelStr.replace(/\n\n/g, '\n'));
const expectedPoliciesStr = readFileSync('examples/rbac_with_hierarchy_policy.csv').toString();
Expand Down

0 comments on commit ae14c36

Please sign in to comment.