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

Please publish RC with shape generator #92

Open
sesm opened this issue Jun 12, 2018 · 1 comment
Open

Please publish RC with shape generator #92

sesm opened this issue Jun 12, 2018 · 1 comment

Comments

@sesm
Copy link

sesm commented Jun 12, 2018

There are 2 issues with not publishing shape generator as RC:

  1. Documentation website says
    Try it! Open the developer console to take the API for a test run.
    At the same, shape generator is present in documentation, but library version in console doesn't support it, so attempt to do something like gen({a: '1'}) results in Uncaught TypeError: gen is not a function.
  2. There is no easy way to use master version, because dist folder is not saved in Github.

A workaround to use master version now is to fork the repo, build, commit dist folder and then put Github url into package.json. This doesn't look easy at all.

@MymmiJ
Copy link

MymmiJ commented Oct 15, 2018

Not sure of the etiquette of this, but thought I would leave a comment here to try to help other people like myself.

It should be possible to generate shapes in most cases, per the docs:

Whenever a non-ValueGenerator is provided to a function which expects a ValueGenerator, it is converted to a ValueGenerator with gen().

I mention this in case, like me, you came across this issue while searching for info on the error: TypeError: gen is not a function you receive when you call gen in jasmine-check. This issue does not mean that it is impossible to generate shapes, so go ahead and just create an object without using gen() explicitly.

However, it does mean that it is impossible to do what you want in certain circumstances:

That makes calling this function optional for most cases, unless trying to be explicit or when using TypeScript or Flow.

So I'm not trying to minimize the issue, only commenting to save people in my situation some time in future.

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

2 participants