3 ms·
I would think that the operation would either (a) have to be pure or (b) be executed in two different environments. I think going for (a) is the easier approach
by jdmichal 11y ago
I would think that the operation would either (a) have to be pure or (b) be executed in two different environments. I think going for (a) is the easier approach. If you produce an output file, make a pure operation that generates the contents, then write it as a subsequent operation. Now you can test the contents against each other, but only actually write one of them.
Basically, create an intermediary object that represents your state change and test those. Then "commit" the change from control and discard the one from the experiment.