Open tbo47 opened 2 months ago
@aloisklink thoughts?
I 100% agree with all of them!
- write jsdoc to improve the types generation. With all the feedback from https://github.com/tbo47/dagre-es/pull/28 https://github.com/tbo47/dagre-es/pull/30 https://github.com/tbo47/dagre-es/pull/29
:+1:
I think if we add a /** @param {Graph} g */
to most functions that use g
as a parameter, that would greatly improve the types, and should hopefully catch any future bugs if we do try to do any lodash migrations/refactoring in the future!
- is there more unit tests to import from legacy project?
I don't think there is.
There are some browser tests in the dagre-d3
repo that we could use: https://github.com/dagrejs/dagre-d3/tree/master/test, but because they need to run in a browser, adding them to this repo would be much harder. The test library they're using is pretty outdated, so it'll be quite a lot of work to use here.
But yes! I'd love to at least have one unit test that could have detected https://github.com/tbo47/dagre-es/pull/40#issuecomment-2373818978