mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-28 23:44:34 -05:00
fix(tests): syntax for loop in console-logger service
Signed-off-by: Erik Michelson <github@erik.michelson.eu> Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
f16b3c0fe6
commit
69d625188c
1 changed files with 6 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -7,9 +7,11 @@ import { ConsoleLoggerService } from './console-logger.service';
|
||||||
|
|
||||||
describe('sanitize', () => {
|
describe('sanitize', () => {
|
||||||
it('removes non-printable ASCII character', () => {
|
it('removes non-printable ASCII character', () => {
|
||||||
for (let i = 0; i++; i < 32) {
|
for (let i = 0; i < 32; i++) {
|
||||||
const hexString = i.toString(16);
|
const nonPrintableString = String.fromCharCode(i);
|
||||||
expect(ConsoleLoggerService.sanitize(`a${hexString}b`)).toEqual('ab');
|
expect(ConsoleLoggerService.sanitize(`a${nonPrintableString}b`)).toEqual(
|
||||||
|
'ab',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
it('replaces non-zero-width space with space', () => {
|
it('replaces non-zero-width space with space', () => {
|
||||||
|
|
Loading…
Reference in a new issue