Skip to content

Commit

Permalink
test(file): use LF for EOL
Browse files Browse the repository at this point in the history
  • Loading branch information
hasundue committed Feb 7, 2024
1 parent 5fdd76c commit 37b22e3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/file_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { basename, dirname } from "./std/path.ts";
import { EOL, formatEOL } from "./std/fs.ts";
import { formatEOL, LF } from "./std/fs.ts";
import {
FileSystemFake,
ReadTextFileStub,
Expand Down Expand Up @@ -47,7 +47,7 @@ async function assertFileSystemSnapshot(
) {
await assertSnapshot(
t,
Array.from(fs.entries()).map(([, content]) => formatEOL(content, EOL)),
Array.from(fs.entries()).map(([, content]) => formatEOL(content, LF)),
);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/std/fs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export { existsSync } from "https://deno.land/std@0.213.0/fs/exists.ts";
export {
detect as detectEOL,
EOL,
format as formatEOL,
LF,
} from "https://deno.land/std@0.213.0/fs/eol.ts";
4 changes: 2 additions & 2 deletions lib/testing.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createAssertSnapshot, spy, Stub, stub } from "./std/testing.ts";
import { EOL, formatEOL } from "./std/fs.ts";
import { formatEOL, LF } from "./std/fs.ts";
import { fromFileUrl } from "./std/path.ts";

export const assertSnapshot = createAssertSnapshot({
Expand Down Expand Up @@ -65,7 +65,7 @@ export const WriteTextFileStub = {
Deno,
"writeTextFile",
(path, data) => {
fs.set(path.toString(), formatEOL(data.toString(), EOL));
fs.set(path.toString(), formatEOL(data.toString(), LF));
return Promise.resolve();
},
);
Expand Down

0 comments on commit 37b22e3

Please sign in to comment.