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

toCommonUnit doesn't work as expected #86

Open
gvlasov opened this issue Dec 17, 2024 · 2 comments
Open

toCommonUnit doesn't work as expected #86

gvlasov opened this issue Dec 17, 2024 · 2 comments

Comments

@gvlasov
Copy link

gvlasov commented Dec 17, 2024

Why does this fail?

  it("should convert measurements to a common unit", () => {
    expect(toCommonUnit([1, 'cm'], [2, 'm'])).not.toBeUndefined()
  });

I would expect it to return [[1, 'cm'], [200, 'cm']], but it returns undefined.

@gvlasov
Copy link
Author

gvlasov commented Dec 17, 2024

Reading this test I can see that this function doesn't do what I expected it to do.

How do you bring two measurements of the same dimension to the same unit?

@gvlasov
Copy link
Author

gvlasov commented Dec 17, 2024

Or how do you compare two measurements of the same dimension with different units? That would solve my problem as well.

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