Skip to content

Commit f956b3d

Browse files
committed
Replace String#replace() with String#replaceAll() per new xo linting requirement.
1 parent ba5fdf7 commit f956b3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ test('.markdownlintignore is applied correctly', async t => {
641641
} catch (error) {
642642
const expected = ['incorrect.md:1:8 MD047/single-trailing-newline Files should end with a single newline character', 'subdir/incorrect.markdown:1:8 MD047/single-trailing-newline Files should end with a single newline character', ''].join('\n');
643643
t.is(error.stdout, '');
644-
t.is(error.stderr.replace(/\\/g, '/'), expected);
644+
t.is(error.stderr.replaceAll('\\', '/'), expected);
645645
t.is(error.exitCode, 1);
646646
}
647647
});
@@ -671,7 +671,7 @@ test('--ignore-path works with .markdownlintignore', async t => {
671671
} catch (error) {
672672
const expected = ['incorrect.md:1:8 MD047/single-trailing-newline Files should end with a single newline character', 'subdir/incorrect.markdown:1:8 MD047/single-trailing-newline Files should end with a single newline character', ''].join('\n');
673673
t.is(error.stdout, '');
674-
t.is(error.stderr.replace(/\\/g, '/'), expected);
674+
t.is(error.stderr.replaceAll('\\', '/'), expected);
675675
t.is(error.exitCode, 1);
676676
}
677677
});

0 commit comments

Comments
 (0)