Open gilbert opened 1 year ago
Hi @gilbert thanks for the report. This should be fixable, I'll look into a solution.
I ran into this myself. Has there been any progress? Not familiar with ospec codebase, but I might be able to find time to look into this if you don't have time @pygy. Let me know if you have any ideas for the solution already.
May be other considerations I am missing, but updating this line to the following seems to work:
only.length === 0 ||
Object.values(spec.children).some(
x => x instanceof Task && only.includes(x.fn)
) ? spec.before : [],
Could use Set
for performance but since the number of only
is typically 1 or small, it shouldn't matter for most use cases.
Any chance we can get @jonahx's fix into a new release? 👀
In this example, the console log runs even though no test in that spec is running (due to the
.only
ontest2
). In my own project this is causing extra debug statements to show up in the console even though they're not relevant to the test I'm focusing on.