Skip to content

Commit

Permalink
Add tests for nested asset where sourceMappingURL contains the subdir…
Browse files Browse the repository at this point in the history
…ectory
  • Loading branch information
DimitriosLisenko committed Oct 18, 2024
1 parent fa7cabf commit 2781167
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var fun; //# sourceMappingURL=/assets/nested/sourceMappingURL-already-prefixed-nested-with-subdirectory.js.map
2 changes: 2 additions & 0 deletions test/propshaft/compiler/source_mapping_urls_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ class Propshaft::Compiler::SourceMappingUrlsTest < ActiveSupport::TestCase
compile_asset(find_asset("sourceMappingURL-already-prefixed.js", fixture_path: "mapped"))
assert_match %r{//# sourceMappingURL=/assets/nested/sourceMappingURL-already-prefixed-nested-[a-z0-9]{8}\.js\.map},
compile_asset(find_asset("nested/sourceMappingURL-already-prefixed-nested.js", fixture_path: "mapped"))
assert_match %r{//# sourceMappingURL=/assets/nested/sourceMappingURL-already-prefixed-nested-with-subdirectory-[a-z0-9]{8}\.js\.map},
compile_asset(find_asset("nested/sourceMappingURL-already-prefixed-nested-with-subdirectory.js", fixture_path: "mapped"))
end

test "sourceMapURL is already prefixed with an incorrect url_prefix" do
Expand Down

0 comments on commit 2781167

Please sign in to comment.