-
-
Notifications
You must be signed in to change notification settings - Fork 200
Open
Labels
💡 Idea to investigateNon straightforward features that seems great but need to be assessed and designed carefully.Non straightforward features that seems great but need to be assessed and designed carefully.🚀 Feature Request
Description
🚀 Feature Request
When checking a property, pass an extra parameter at the end of the values. It can contain information such as the seed, shrink data, run number, etc.
Motivation
I am using fast-check for an end-to-end test. Each property run I create a new database in my Postgres instance. When the run fails, I would like to leave the database in place so I can investigate the database state. I would like to add some information to the database name (and possibly within the database itself) that I can cross-reference with the test output.
Example
it.prop(
[fc.array(arbPerson()).chain(arbCommands)],
)(
'should preserve invariants throughout operation',
async (commands, runId) => {
const databaseName = `papertrace-validation-e2e-test-${new Date().toISOString()}-run-${runId}`;
// create the database and run the test
},
);
Meanwhile, I can count the run number with a variable in a larger scope. That wouldn't help me get the seed though.
Metadata
Metadata
Assignees
Labels
💡 Idea to investigateNon straightforward features that seems great but need to be assessed and designed carefully.Non straightforward features that seems great but need to be assessed and designed carefully.🚀 Feature Request