Skip to content

Commit

Permalink
Fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
emkguts committed Feb 4, 2025
1 parent 7fbb799 commit c222a1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/style/module_directives/alias_lifting_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

defmodule Quokka.Style.ModuleDirectives.AliasLiftingTest do
@moduledoc false
use Quokka.StyleCase, async: true
use Quokka.StyleCase, async: false

test "lifts aliases repeated >=2 times from 3 deep" do
assert_style(
Expand Down
7 changes: 7 additions & 0 deletions test/style/single_node_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,14 @@ defmodule Quokka.Style.SingleNodeTest do
end

describe "numbers" do
setup do
on_exit(fn ->
Quokka.Config.set_for_test!(:large_numbers_gt, :infinity)
end)
end

test "styles floats and integers with >4 digits" do
Quokka.Config.set_for_test!(:large_numbers_gt, 9999)
assert_style("10000", "10_000")
assert_style("1_0_0_0_0", "10_000")
assert_style("-543213", "-543_213")
Expand Down

0 comments on commit c222a1a

Please sign in to comment.