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 noticed that, in a spec tree with nested describes, and only pending entries, the last pending entry in each describe isn't reported in the output. Here's the simplest example I could make:
demoSpec :: Spec Unit
demoSpec = do
describe "outer" do
describe "a ~ should show 2 pending" do
pending "a1"
pending "a2"
describe "b ~ should show 1 pending" do
pending "b1"
This gives the following output:
outer » a ~ should show 2 pending
~ a1
outer » b ~ should show 1 pending
~ b1
Summary
0/0 tests passed
3 tests pending
Notice that ~ a2 is missing from the report. Despite the summary saying there are 3 tests pending, only 2 are shown.
If I add extra pending entries to the leaf describes (e.g. a pending "b2") then the last pending in each describe (unless it's the only entry in that describe) is missing. If I replace any of the pending entries with an it (e.g. it "b1" $ pure unit), then all of the expected pending entries appear. If I remove the describe "outer", then all the expected pending entries appear.
I appreciate that a tree with all pending tests is an edge case. I'm very new to PureScript and came across it while experimenting with ways to generate tests (pending "blah" is less typing than it "blah" $ pure unit). I'd assume the error was all mine (maybe I'm misunderstanding something about do notation?), but the mismatch with the summary's count of pending tests suggests that there might be an error in purescript-spec. What do you think?
The text was updated successfully, but these errors were encountered:
I noticed that, in a spec tree with nested
describe
s, and onlypending
entries, the lastpending
entry in eachdescribe
isn't reported in the output. Here's the simplest example I could make:This gives the following output:
Notice that
~ a2
is missing from the report. Despite the summary saying there are 3 tests pending, only 2 are shown.If I add extra
pending
entries to the leafdescribe
s (e.g. apending "b2"
) then the lastpending
in eachdescribe
(unless it's the only entry in thatdescribe
) is missing. If I replace any of thepending
entries with anit
(e.g.it "b1" $ pure unit
), then all of the expectedpending
entries appear. If I remove thedescribe "outer"
, then all the expectedpending
entries appear.I appreciate that a tree with all
pending
tests is an edge case. I'm very new to PureScript and came across it while experimenting with ways to generate tests (pending "blah"
is less typing thanit "blah" $ pure unit
). I'd assume the error was all mine (maybe I'm misunderstanding something about do notation?), but the mismatch with the summary's count of pending tests suggests that there might be an error in purescript-spec. What do you think?The text was updated successfully, but these errors were encountered: