Skip to content

Commit 5769f5f

Browse files
committed
test: use os EOL
1 parent c335226 commit 5769f5f

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

test/files.test.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import fs from 'fs';
22
import path from 'path';
3+
import { EOL } from 'os';
34
import { getAllFilesToTransform, getFileInfo, writeFile } from '../src/files';
45

56
describe('files', () => {
@@ -22,13 +23,7 @@ describe('files', () => {
2223
const testFile = path.join(__dirname, 'css', 'a.css');
2324
expect(getFileInfo(testFile)).toEqual({
2425
path: testFile,
25-
source: `.class {
26-
margin: 42px;
27-
color: blue;
28-
padding-right: 10em;
29-
background-color: rgba(0, 0, 0, 0.2);
30-
}
31-
`,
26+
source: `.class {${EOL} margin: 42px;${EOL} color: blue;${EOL} padding-right: 10em;${EOL} background-color: rgba(0, 0, 0, 0.2);${EOL}}${EOL}`,
3227
});
3328
expect(consoleError).not.toHaveBeenCalled();
3429
expect(processExit).not.toHaveBeenCalled();

0 commit comments

Comments
 (0)