diff --git a/test/modules/privacy_test.js b/test/modules/privacy_test.js index 70dbe628c..e8de43d25 100644 --- a/test/modules/privacy_test.js +++ b/test/modules/privacy_test.js @@ -10,19 +10,16 @@ describe('Privacy', () => { describe('redactSessionID', () => { it('should redact all session IDs', () => { const text = - 'This is a log line with a session ID 0531032fc7415b7cc1b7516480ad121d391eddce3cfb2cee27dd5b215609c32827\n' + - 'and another one 05766049a70e725ad02f7fe61b10e461380a4d7433f98096b3cacbf0362d5cab62'; + 'This is a log line with a session ID 0531032fc7415b7cc1b7516480ad121d391eddce3cfb2cee27dd5b215609c32827 and another one 05766049a70e725ad02f7fe61b10e461380a4d7433f98096b3cacbf0362d5cab62'; const actual = Privacy.redactSessionID(text); - const expected = - 'This is a log line with a session ID [REDACTED]\n and another one [REDACTED]'; + const expected = 'This is a log line with a session ID [REDACTED] and another one [REDACTED]'; assert.equal(actual, expected); }); it('should not redact non session IDS', () => { const text = - 'This is a log line with a non-session ID sadsad0531032fc7415b7cc1b7516480ad121d391eddce3cfb2cee27dd5b215609c32827888\n' + - 'and another one 766049a70e725ad02f7fe61b10e461380a4d7433f98096b3cacbf0362d5cab6234'; + 'This is a log line with a non-session ID sadsad0531032fc7415b7cc1b7516480ad121d391eddce3cfb2cee27dd5b215609c32827888 and another one 766049a70e725ad02f7fe61b10e461380a4d7433f98096b3cacbf0362d5cab6234'; const actual = Privacy.redactSessionID(text); assert.equal(actual, text); @@ -31,12 +28,11 @@ describe('Privacy', () => { describe('redactGroupIds', () => { it('should redact all group IDs', () => { - const text = 'This is a log line with two group IDs: group(123456789)\nand group(abcdefghij)'; + const text = 'This is a log line with two group IDs: group(123456789) and group(abcdefghij)'; const actual = Privacy.redactGroupIds(text); const expected = - 'This is a log line with two group IDs: group([REDACTED]789)\n' + - 'and group([REDACTED]hij)'; + 'This is a log line with two group IDs: group([REDACTED]789) and group([REDACTED]hij)'; assert.equal(actual, expected); }); diff --git a/test/modules/types/attachment_test.js b/test/modules/types/attachment_test.js index 73bffc732..e51d93b78 100644 --- a/test/modules/types/attachment_test.js +++ b/test/modules/types/attachment_test.js @@ -216,10 +216,7 @@ describe('Attachment', () => { }, }); } catch (error) { - assert.strictEqual( - error.message, - 'Expected `attachment.data` to be an array buffer; got: number' - ); + assert.strictEqual(error.message, 'Expected 42 to be an array buffer got: number'); return; }