Treat all filenames as absolute paths. (#8044)

This commit is contained in:
Logan Smyth
2018-05-24 20:56:19 -07:00
committed by GitHub
parent 98ff2ce877
commit 53e4d74ebe
22 changed files with 69 additions and 45 deletions

View File

@@ -1,10 +1,10 @@
const actual = transform(
'<Foo bar="baz" />',
Object.assign({}, opts, { filename: 'fake/path/mock.js' })
Object.assign({}, opts, { filename: '/fake/path/mock.js' })
).code;
const expected = multiline([
'var _jsxFileName = "fake/path/mock.js";',
'var _jsxFileName = "/fake/path/mock.js";',
'React.createElement(Foo, {',
' bar: "baz",',
' __source: {',