Skip to content

Commit

Permalink
Remove race in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Apr 28, 2022
1 parent 0fa8c24 commit 363edfa
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions test/ex_doc/formatter/html_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ defmodule ExDoc.Formatter.HTMLTest do
generate_docs(doc_config(context, main: "Randomerror"))
end)

assert output == "warning: index.html redirects to Randomerror.html, which does not exist\n"
assert output =~ "warning: index.html redirects to Randomerror.html, which does not exist\n"
assert File.regular?(tmp_dir <> "/html/index.html")
assert File.regular?(tmp_dir <> "/html/RandomError.html")
end
Expand All @@ -104,17 +104,6 @@ defmodule ExDoc.Formatter.HTMLTest do
assert output =~ ~r"Warnings.bar/0.*\n test/fixtures/warnings.ex:8: t:Warnings.t/0"
end

test "warns on undefined functions in file", context do
output =
capture_io(:stderr, fn ->
generate_docs(
doc_config(context, skip_undefined_reference_warnings_on: ["test/fixtures/warnings.ex"])
)
end)

assert output == ""
end

test "generates headers for index.html and module pages", %{tmp_dir: tmp_dir} = context do
generate_docs(doc_config(context, main: "RandomError"))
content_index = File.read!(tmp_dir <> "/html/index.html")
Expand Down

0 comments on commit 363edfa

Please sign in to comment.