Regression in v2.15.0
See original GitHub issue🐛 Bug Report
I was trying to upgrade the fast-check
version in one of my packages from v2.14.0 to the latest version, but my tests began to fail. I bisected the versions and it looks like the regression occurred in v2.15.0. I’ve also put together a small repro.
To Reproduce
Run the following:
import * as fc from 'fast-check'
fc.assert(
fc.property(
fc.tuple(
fc.tuple(
fc.func(fc.anything())
)
).map(([x]) => x).map(([x]) => x),
console.log
)
)
The following error occurs:
file:///home/tomer/playground/node_modules/.pnpm/fast-check@2.18.0/node_modules/fast-check/lib/esm/check/arbitrary/definition/NextArbitrary.js:114
Object.defineProperty(mappedValue, cloneMethod, { get: () => () => this.mapperWithCloneIfNeeded(v)[0] });
^
TypeError: Cannot redefine property: Symbol(fast-check/cloneMethod)
at Function.defineProperty (<anonymous>)
at MapArbitrary.mapperWithCloneIfNeeded (file:///home/tomer/playground/node_modules/.pnpm/fast-check@2.18.0/node_modules/fast-check/lib/esm/check/arbitrary/definition/NextArbitrary.js:114:20)
at MapArbitrary.valueMapper (file:///home/tomer/playground/node_modules/.pnpm/fast-check@2.18.0/node_modules/fast-check/lib/esm/check/arbitrary/definition/NextArbitrary.js:119:49)
at MapArbitrary.generate (file:///home/tomer/playground/node_modules/.pnpm/fast-check@2.18.0/node_modules/fast-check/lib/esm/check/arbitrary/definition/NextArbitrary.js:84:21)
at MapArbitrary.generate (file:///home/tomer/playground/node_modules/.pnpm/fast-check@2.18.0/node_modules/fast-check/lib/esm/check/arbitrary/definition/NextArbitrary.js:83:28)
at file:///home/tomer/playground/node_modules/.pnpm/fast-check@2.18.0/node_modules/fast-check/lib/esm/arbitrary/_internals/TupleArbitrary.js:43:62
at Array.map (<anonymous>)
at TupleArbitrary.generate (file:///home/tomer/playground/node_modules/.pnpm/fast-check@2.18.0/node_modules/fast-check/lib/esm/arbitrary/_internals/TupleArbitrary.js:43:49)
at Property.generate (file:///home/tomer/playground/node_modules/.pnpm/fast-check@2.18.0/node_modules/fast-check/lib/esm/check/property/Property.generic.js:22:55)
at Object.value (file:///home/tomer/playground/node_modules/.pnpm/fast-check@2.18.0/node_modules/fast-check/lib/esm/check/runner/Tosser.js:6:28)
Expected behavior
It should run without throwing.
Your environment
Packages / Softwares | Version(s) |
---|---|
fast-check | v2.15.0 |
node | v16.11.0 |
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
color stream shown blank in realsense viewer exept for YUYV ...
Issue Description. I open realsense viewer and start color stream in RGB8, which results in a blank screen.
Read more >How To Interpret R-squared in Regression Analysis
R-squared measures the strength of the relationship between your linear model and the dependent variables on a 0 - 100% scale. Learn about...
Read more >Chapter 15 – Multiple Regression
Multiple regression is an extension of the linear regression already studied where we create a model to explain a response variable based on...
Read more >15 Types of Regression in Data Science - ListenData
This article explains 15 types of regression techniques which are used for various data problems. It includes detailed theoretical and practical explanation ...
Read more >Simple linear regression in Stata® - YouTube
Discover how to fit a simple linear regression model and graph the results using Stata. Copyright 2011-2019 StataCorp LLC.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Upgraded to v2.18.1 and can confirm my tests are passing 😄
Fix included and published in: