Skip to content

Commit c1d2093

Browse files
committed
Fix sonarqube observations for test file
1 parent 10db1eb commit c1d2093

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/blocks/slack/test/wait-for-interaction.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ function normalizeEmojiStringMock(str: string): string {
66
'✅': ':white_check_mark:',
77
};
88
let result = str;
9-
Object.entries(emojiMap).forEach(([emoji, shortcode]) => {
10-
result = result.replace(new RegExp(emoji, 'g'), shortcode);
11-
});
9+
for (const [emoji, shortcode] of Object.entries(emojiMap)) {
10+
result = result.replaceAll(emoji, shortcode);
11+
}
1212
return result;
1313
}
1414

0 commit comments

Comments
 (0)