-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Truncate file names in gen_report #7
Conversation
Soooo I am partial to keeping the logic in the extension as dumb as possible due to the annoying complexity of testing it (and essentially writing code inside of an eval). The approach in the other PRs #2 #5 of patching filewriter seems to be an OK solution for me (so long as the solution works) :) thoughts? |
The other approach is to just move this logic into the I think at the point |
Just re-read the gen_report code, and saw that you just read the file straight in. Guess if you stuck these changes in there, it'd be fine? |
Hmm I see your point there is some interesting complexity here...
^ I am very much in favor of moving this complexity into gen_report 👍 |
50a743c
to
3306298
Compare
Pushed up now, seems to work fine. |
var originals = JSON.parse(dump.originals) | ||
var truncateFileNames = function (data) { | ||
return Object.keys(data).reduce(function (n, path) { | ||
console.log('Path', path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ log and we can land this
boom 1 tiny nit and we can land this! Thanks for dealing w/ the code review 👍 👏 |
Done! |
tight. |
I think this should fix the long filename issue. Rather than trying to mess with Istanbul internals, this will truncate the filenames as you are saving. Seems to be working for me, where it wasn't before.