From bb7c462b22ede47cc1d28867cfa4c56e33230792 Mon Sep 17 00:00:00 2001 From: Tim Guibord Date: Tue, 12 Dec 2023 10:32:25 -0500 Subject: [PATCH] update spec --- test/propshaft/compiler/source_mapping_urls_test.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/propshaft/compiler/source_mapping_urls_test.rb b/test/propshaft/compiler/source_mapping_urls_test.rb index 1b10e4b..d5a4f0d 100644 --- a/test/propshaft/compiler/source_mapping_urls_test.rb +++ b/test/propshaft/compiler/source_mapping_urls_test.rb @@ -14,14 +14,14 @@ class Propshaft::Compiler::SourceMappingUrlsTest < ActiveSupport::TestCase end test "matching source map" do - assert_match %r{//# sourceMappingURL=/assets/source.js-[a-z0-9]{40}\.map}, + assert_match %r{//# sourceMappingURL=/assets/source-[a-z0-9]{40}\.js.map}, compile_asset(find_asset("source.js", fixture_path: "mapped")) - assert_match %r{/\*# sourceMappingURL=/assets/source.css-[a-z0-9]{40}\.map}, + assert_match %r{/\*# sourceMappingURL=/assets/source-[a-z0-9]{40}\.css.map}, compile_asset(find_asset("source.css", fixture_path: "mapped")) end test "matching nested source map" do - assert_match %r{//# sourceMappingURL=/assets/nested/another-source.js-[a-z0-9]{40}\.map}, + assert_match %r{//# sourceMappingURL=/assets/nested/another-source-[a-z0-9]{40}\.js.map}, compile_asset(find_asset("nested/another-source.js", fixture_path: "mapped")) end @@ -38,9 +38,9 @@ class Propshaft::Compiler::SourceMappingUrlsTest < ActiveSupport::TestCase end test "sourceMappingURL not at the beginning of the line, but at end of file, is processed" do - assert_match %r{//# sourceMappingURL=/assets/sourceMappingURL-not-at-start.js-[a-z0-9]{40}\.map}, + assert_match %r{//# sourceMappingURL=/assets/sourceMappingURL-not-at-start-[a-z0-9]{40}\.js.map}, compile_asset(find_asset("sourceMappingURL-not-at-start.js", fixture_path: "mapped")) - assert_match %r{/\*# sourceMappingURL=/assets/sourceMappingURL-not-at-start.css-[a-z0-9]{40}\.map \*/}, + assert_match %r{/\*# sourceMappingURL=/assets/sourceMappingURL-not-at-start-[a-z0-9]{40}\.css.map \*/}, compile_asset(find_asset("sourceMappingURL-not-at-start.css", fixture_path: "mapped")) end @@ -56,7 +56,7 @@ class Propshaft::Compiler::SourceMappingUrlsTest < ActiveSupport::TestCase test "relative url root" do @options.relative_url_root = "/url-root" - assert_match %r{//# sourceMappingURL=/url-root/assets/source.js-[a-z0-9]{40}\.map}, + assert_match %r{//# sourceMappingURL=/url-root/assets/source-[a-z0-9]{40}\.js.map}, compile_asset(find_asset("source.js", fixture_path: "mapped")) end