Ignore the SEO json tag, which is inconsistently rendered locally and on actions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user