Skip to content

Commit

Permalink
Ignore the SEO json tag, which is inconsistently rendered locally and…
Browse files Browse the repository at this point in the history
… on actions
  • Loading branch information
Jess Bees committed Feb 2, 2022
1 parent 2788dc5 commit d0debd2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/compare_expected_output
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ differences = []

expected_files.each do |expected_file|
if actual_files.include?(expected_file)
# TODO: consider -b to ignore whitespace, or -B for ignore blank lines, or --strip-trailing-cr
diff = `diff #{Shellwords.escape(File.join("_expected", expected_file))} #{Shellwords.escape(File.join("_site", expected_file))}`
# FIXME: if we are able to move the expected output recording job onto actions,
# then we will be able to remove the -I param below which ignores the SEO json
# tag, because the recording will be consistent with the test output.
diff = `diff -I '"@context":"https://schema.org"' #{Shellwords.escape(File.join("_expected", expected_file))} #{Shellwords.escape(File.join("_site", expected_file))}`
if !$?.success?
differences << "Expected output of #{expected_file} differs:\n#{diff}"
end
Expand Down

0 comments on commit d0debd2

Please sign in to comment.