Units tests
AntoinePy11 opened this issue · 0 comments
AntoinePy11 commented
Hello everyone,
I would like to add units tests to the library using Jest for example.
I don't find any solutions to test the methods inside force-graph.js.
I try to do like this:
import ForceGraph from "../src/force-graph";
describe("graph2ScreenCoords", () => {
test("should be defined", () => {
expect(ForceGraph.methods.graph2ScreenCoords).toBeDefined();
});
});
I have the following error: TypeError: Cannot read properties of undefined (reading 'graph2ScreenCoords')
.
Did you try to add units tests or do you have any thoughts following my error ?
Thanks :)