@samitouri / QOS-React / commits / 6afd51061a

Embed JSX filename paths relative to repo root (#6778)

Test Plan: Changed the preprocessor to log the output of babel.transform and saw ``` var _jsxFileName = 'src/isomorphic/modern/element/__tests__/ReactJSXElementValidator-test.js'; ``` in the resulting output, instead of an absolute path.

Ben Alpert committed May 16, 2016 at 11:15 UTC 6afd51061a251f39f7951063f41419917f626f02
1 file changed +4 -1
scripts/jest/preprocessor.js
+4 -1
@@ -54,7 +54,10 @@ module.exports = {
54 ) {
55 return babel.transform(
56 src,
57 - Object.assign({filename: filePath}, babelOptions)
57 + Object.assign(
58 + {filename: path.relative(process.cwd(), filePath)},
59 + babelOptions
60 + )
61 ).code;
62 }
63 return src;