chore: silence code quality warning about backslash escape

This commit is contained in:
Fredrik Adelöw
2021-01-16 15:48:38 +01:00
parent 57460cda02
commit bc4424b9d2
+1 -1
View File
@@ -152,7 +152,7 @@ export async function waitForPageWithText(
// The page may not be fully loaded and hence we need to retry.
let findTextAttempts = 0;
const escapedText = text.replace(/"/g, '\\"');
const escapedText = text.replace(/(["\\])/g, '\\$1');
for (;;) {
try {
browser.assert.evaluate(