tbo47 / dagre-es

The dagrejs library exported as ES modules.
Other
33 stars 14 forks source link

todo #36

Open tbo47 opened 2 months ago

tbo47 commented 2 months ago
tbo47 commented 1 month ago

@aloisklink thoughts?

aloisklink commented 1 month ago

I 100% agree with all of them!

:+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