Skip to content

Commit 242961d

Browse files
committedJan 2, 2020
Normalizing snapshots line endings to LF
1 parent ed4a3ce commit 242961d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎test/index.test.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jest.mock('../src/relativePath', () => ({
1111
},
1212
}));
1313

14+
const normalizeNewlines = string => string.replace(/\\r\\n/g, '\\n');
15+
1416
describe('Add propType doc to react components', () => {
1517
const fixturesDir = path.join(__dirname, 'fixtures');
1618
fs.readdirSync(fixturesDir).map(caseName => {
@@ -35,7 +37,7 @@ describe('Add propType doc to react components', () => {
3537
babelrc: false,
3638
};
3739

38-
const output = transformFileSync(inputPath, options).code;
40+
const output = normalizeNewlines(transformFileSync(inputPath, options).code);
3941
expect(output).toMatchSpecificSnapshot(outputPath);
4042
});
4143
}

0 commit comments

Comments
 (0)
Please sign in to comment.