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 @@
var actual = transform(
'var x = <sometag />',
Object.assign({}, opts, { filename: 'fake/path/mock.js' })
Object.assign({}, opts, { filename: '/fake/path/mock.js' })
).code;
var expected = multiline([
'var _jsxFileName = "fake/path/mock.js";',
'var _jsxFileName = "/fake/path/mock.js";',
'var x = <sometag __source={{',
' fileName: _jsxFileName,',
' lineNumber: 1',