Open Louis-Ye opened 1 year ago
https://github.com/google/pprof/pull/798 is addressing this issue.
Should we leave this issue as open until we cover most of the Javascript code with tests (the current state just exercises one small part - the sorting of the Top table)?
Probably yes, we should keep it open - I would say at least until we have one happy-path test for each view and filtering feature.
Per @ghemawat from https://github.com/google/pprof/pull/790:
None of the javascript in pprof is tested.
One alternative is that we might need to install node in some github action and use that (maybe something like https://github.com/browser-actions/examples).
Another alternative would be to do manually triggered tests: if pprof is invoked with a special flag, it passes that to the javascript, and the javascript code when it sees that flag runs self tests. But it would be better to figure out how to have real tests.