Ignore the SEO json tag, which is inconsistently rendered locally and on actions

This commit is contained in:
Jess Bees
2022-02-02 11:59:50 -05:00
parent 2788dc5c6e
commit d0debd29ca
+4 -2
View File
@@ -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