Closed jfet97 closed 1 year ago
Not sure how to test
logWarning
You would need to set a fake logger via eff.provideSomeLayer(Logger.replace(Logger.defaultLogger, customLogger))
that stores it’s results in an array, then you can evaluate after if you find the message in the array.
For future me: do ask Patrick how to properly write it using effects instead of trickeffects
For future me: do ask Patrick how to properly write it using effects instead of trickeffects
@jfet97 here you go :) https://github.com/effect-ts-app/libs/commit/ddaeee3a69f24471bca058b711b85be055b0363d effects need to run :) usually you run them to an exit or either value, and then compare that. exit would be preferred, but there's some trouble with exits as they also include tracing, which makes them hard to compare, since we only care about E and A anyway, I just went for running to Either.
now I was contemplating just like with validation it may be nice to get all the issues combined, instead of bailing at the first sign of trouble. but then again, it isn't really practically required, this thing is just supposed to inform the user of a dumb mistake, which is better than being unaware, and actually sufficient :)
@jfet97 missing changeset, then ready to go from my side
@patroza let's see how many false positive we get this time
Not sure how to test
logWarning