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

carmi does not handle Infinity correctly #82

Open
roymiloh opened this issue Jan 6, 2019 · 0 comments
Open

carmi does not handle Infinity correctly #82

roymiloh opened this issue Jan 6, 2019 · 0 comments

Comments

@roymiloh
Copy link
Contributor

roymiloh commented Jan 6, 2019

When I try to return Infinity as a result of a transformation, I'm getting a null:

const {compile} = require("carmi");

describe('some suite', () => {
  it('returns Infinity', async () => {
    const model = {
      a: root.get('a').eq(true).ternary(Infinity, 0),
    }

    const modelFunction = eval(await compile(model));

    const carmiModel = await modelFunction({a: true}, {});

    expect(carmiModel.a).toEqual(Infinity)
  })
});
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