Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lessthanseventy committed Apr 22, 2023
1 parent 0ef243c commit 29b797e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 0 additions & 2 deletions lib/mix/tasks/excessibility.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ defmodule Mix.Tasks.Excessibility do
def run(_args) do
Mix.Task.run(@assets_task)

File.mkdir_p("#{@ex_assets_path}/css/")
File.mkdir_p("#{@ex_assets_path}/js/")
File.mkdir_p("#{@snapshots_path}/")

File.ls!(@snapshots_path)
Expand Down
9 changes: 2 additions & 7 deletions test/excessibility_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ defmodule ExcessibilityTest do

@output_path "test/excessibility"
@snapshots_path "#{@output_path}/html_snapshots"
@ex_assets_path "#{@output_path}/assets"

describe "run/1" do
@describetag :flipper
test "when all pa11y checks pass" do
Mix.Project.in_project(:test_pass, "test_pass/", fn _ ->
assert capture_io(fn ->
refute capture_io(fn ->
Mix.Task.run("excessibility")
end) =~
"Error:"
|> IO.inspect()
end)
end

Expand All @@ -25,14 +22,12 @@ defmodule ExcessibilityTest do
Mix.Task.run("excessibility")
end) =~
"Error:"
|> IO.inspect()
end)
end

test "creates necessary directories for assets" do
Mix.Project.in_project(:test_pass, "test_pass/", fn _ ->
assert File.exists?("#{@ex_assets_path}/css")
assert File.exists?("#{@ex_assets_path}/js")
assert File.exists?("#{@ex_assets_path}/html_snapshots/")
end)
end
end
Expand Down

0 comments on commit 29b797e

Please sign in to comment.