You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a non-numerical keys for the array and it is not working on the latest master(build on 04-14-2018 - testcheck@^1.0.0-rc.2). Seems like it used to work for the old code that is published to npm.
Hello
=====================================================================
For the same code output on the master build from 04-14-2018 (testcheck@^1.0.0-rc.2)
Thanks for reporting this! This seems like a bug since the master build now clones values returned from .then() to avoid mutation cross-affecting tests, and the clone behavior for Arrays only includes array indices and doesn't consider non-numeric keys.
You should be able to work around this in the meantime by changing return val; to return gen.return(val);
Issue:
I'm trying to create a non-numerical keys for the array and it is not working on the latest master(build on 04-14-2018 - testcheck@^1.0.0-rc.2). Seems like it used to work for the old code that is published to npm.
Working Example on the console of 'http://leebyron.com/testcheck-js ':
const arr = gen.array(gen.int,{size:10})
const oneMoreArr = arr.then(val => {
val['foo'] = ()=> console.log('Hello')
return val;
});
sampleOne(oneMoreArr2)
sampleOne(oneMoreArr2).foo();
Output:
sampleOne(oneMoreArr2)
sampleOne(oneMoreArr2).foo();
sampleOne(oneMoreArr2)
sampleOne(oneMoreArr2).foo();
The text was updated successfully, but these errors were encountered: