From 2778929d4cfc1f0ed1b6a1f9191b26b64df1beab Mon Sep 17 00:00:00 2001 From: keshav1sharma Date: Sun, 31 Dec 2023 00:54:53 +0530 Subject: [PATCH] Resolved Invalid test cases for slugify closes #212 -Replaced invalid escape sequence with the required unicode escape sequence. --- packages/string/test/slugify.test.js | 2 +- packages/string/test/stripInvisibleChars.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/string/test/slugify.test.js b/packages/string/test/slugify.test.js index 099427b50..558b874be 100644 --- a/packages/string/test/slugify.test.js +++ b/packages/string/test/slugify.test.js @@ -43,7 +43,7 @@ describe('Slugify', function () { }); it('should remove control characters', function () { - var result = slugify('control:\x07notcontrol:\xB5'); + var result = slugify('control:\x07notcontrol:\u00B5'); result.should.equal('control-notcontrol-u'); }); diff --git a/packages/string/test/stripInvisibleChars.test.js b/packages/string/test/stripInvisibleChars.test.js index 8b7c4e237..fdb34afe1 100644 --- a/packages/string/test/stripInvisibleChars.test.js +++ b/packages/string/test/stripInvisibleChars.test.js @@ -9,7 +9,7 @@ describe('Strip Invisible Chars', function () { }); it('should remove control characters', function () { - var result = stripInvisibleChars('control:\x07notcontrol:\xB5'); + var result = stripInvisibleChars('control:\x07notcontrol:\u00B5'); result.should.equal('control:notcontrol:ยต'); });