From 29b797e3979c549f9725b1362f46ebf433588c1d Mon Sep 17 00:00:00 2001 From: Andrew Moore Date: Sun, 16 Apr 2023 19:07:35 -0600 Subject: [PATCH] fix tests --- lib/mix/tasks/excessibility.ex | 2 -- test/excessibility_test.exs | 9 ++------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/mix/tasks/excessibility.ex b/lib/mix/tasks/excessibility.ex index 861366a..26e3e69 100644 --- a/lib/mix/tasks/excessibility.ex +++ b/lib/mix/tasks/excessibility.ex @@ -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) diff --git a/test/excessibility_test.exs b/test/excessibility_test.exs index f74e1c0..1e295f1 100644 --- a/test/excessibility_test.exs +++ b/test/excessibility_test.exs @@ -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 @@ -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