Skip to content

Commit

Permalink
BeforeEach and AfterEach fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleitnick committed Dec 10, 2024
1 parent 312d41f commit 016f37f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ci/Test.luau
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,17 @@ function TestContext:Describe(name: string, fn: () -> ())
}
self.Current = group
parentGroup.Items[name] = group
for _, fn in parentGroup.BeforeEachFns do
fn()
end
fn()
self.Current = parentGroup
if group.AnyFail then
parentGroup.AnyFail = true
end
for _, fn in parentGroup.AfterEachFns do
fn()
end
end

function TestContext:Expect(value: any): TestExpect
Expand Down

0 comments on commit 016f37f

Please sign in to comment.