Skip to content

Commit

Permalink
Replace String#replace() with String#replaceAll() per new xo linting …
Browse files Browse the repository at this point in the history
…requirement.
  • Loading branch information
DavidAnson committed Jul 18, 2023
1 parent ba5fdf7 commit f956b3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ test('.markdownlintignore is applied correctly', async t => {
} catch (error) {
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');
t.is(error.stdout, '');
t.is(error.stderr.replace(/\\/g, '/'), expected);
t.is(error.stderr.replaceAll('\\', '/'), expected);
t.is(error.exitCode, 1);
}
});
Expand Down Expand Up @@ -671,7 +671,7 @@ test('--ignore-path works with .markdownlintignore', async t => {
} catch (error) {
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');
t.is(error.stdout, '');
t.is(error.stderr.replace(/\\/g, '/'), expected);
t.is(error.stderr.replaceAll('\\', '/'), expected);
t.is(error.exitCode, 1);
}
});
Expand Down

0 comments on commit f956b3d

Please sign in to comment.