From ae14c367b40b354bb9766db6c46691f048cab405 Mon Sep 17 00:00:00 2001 From: imp2002 Date: Thu, 2 Feb 2023 18:09:13 +0800 Subject: [PATCH] fix: avoid the impact of line breaks CRLF in frontend.test.ts --- test/frontend.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/frontend.test.ts b/test/frontend.test.ts index 5855b1c..17202a3 100644 --- a/test/frontend.test.ts +++ b/test/frontend.test.ts @@ -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();