mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Remove require("os") from helpers to reduce dependencies for browser scenarios.
This commit is contained in:
parent
9ec14f13a1
commit
fd24b9552b
4 changed files with 20 additions and 20 deletions
|
|
@ -387,7 +387,7 @@ test("forEachInlineCodeSpan", (t) => {
|
|||
});
|
||||
|
||||
test("getPreferredLineEnding", (t) => {
|
||||
t.plan(17);
|
||||
t.plan(19);
|
||||
const testCases = [
|
||||
[ "", os.EOL ],
|
||||
[ "\r", "\r" ],
|
||||
|
|
@ -412,6 +412,16 @@ test("getPreferredLineEnding", (t) => {
|
|||
const actual = helpers.getPreferredLineEnding(input);
|
||||
t.is(actual, expected, "Incorrect line ending returned.");
|
||||
});
|
||||
t.is(
|
||||
helpers.getPreferredLineEnding("", "linux"),
|
||||
"\n",
|
||||
"Incorrect line ending for linux"
|
||||
);
|
||||
t.is(
|
||||
helpers.getPreferredLineEnding("", "win32"),
|
||||
"\r\n",
|
||||
"Incorrect line ending for win32"
|
||||
);
|
||||
});
|
||||
|
||||
test("applyFix", (t) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue