Skip to content
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

Units tests #325

Open
AntoinePy11 opened this issue Jun 20, 2023 · 0 comments
Open

Units tests #325

AntoinePy11 opened this issue Jun 20, 2023 · 0 comments

Comments

@AntoinePy11
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant