We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
{}
Per the documentation, I'm trying to generate a simple object shape like so:
gen.sample({ x: gen.string })
But the output of the string generator is always just an empty object:
string
[ { x: {} }, { x: {} }, { x: {} }, { x: {} }, { x: {} }, { x: {} }, { x: {} }, { x: {} }, { x: {} }, { x: {} } ]
Relevant parts of my yarn.lock:
yarn.lock
jasmine-check@^1.0.0-rc.0: version "1.0.0-rc.0" resolved "https://registry.yarnpkg.com/jasmine-check/-/jasmine-check-1.0.0-rc.0.tgz#117728c150078ecf211986c5f164275b71e937a4" dependencies: testcheck "^1.0.0-rc" testcheck@^1.0.0-rc, testcheck@^1.0.0-rc.2: version "1.0.0-rc.2" resolved "https://registry.yarnpkg.com/testcheck/-/testcheck-1.0.0-rc.2.tgz#11356a25b84575efe0b0857451e85b5fa74ee4e4"
The text was updated successfully, but these errors were encountered:
From what I can tell, the documentation on the website seems to describe a version that hasn't been formally released yet.
In the meantime, you should be able to work around this discrepancy by surrounding your struct-of-generators with a call to gen.object:
gen.object
gen.sample(gen.object({ x: gen.string }))
Sorry, something went wrong.
No branches or pull requests
Per the documentation, I'm trying to generate a simple object shape like so:
But the output of the
string
generator is always just an empty object:Relevant parts of my
yarn.lock
:The text was updated successfully, but these errors were encountered: