Skip to content

Commit dd32663

Browse files
committed
Demonstrate test failure w/ source maps generation
1 parent 85e8ff6 commit dd32663

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

test/fixtures/assets/mapped/prefixed-source.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/assets/mapped/prefixed-source.js.map

Whitespace-only changes.

test/propshaft/compiler/source_mapping_urls_test.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ class Propshaft::Compiler::SourceMappingUrlsTest < ActiveSupport::TestCase
2525
compile_asset(find_asset("nested/another-source.js", fixture_path: "mapped"))
2626
end
2727

28+
test "resolves prefix on source map filename" do
29+
assert_match %r{//# sourceMappingURL=/assets/source.js-[a-z0-9]{40}\.map},
30+
compile_asset(find_asset("prefixed-source.js", fixture_path: "mapped"))
31+
end
32+
2833
test "missing source map" do
2934
assert_no_match %r{sourceMappingURL},
3035
compile_asset(find_asset("sourceless.js", fixture_path: "mapped"))

0 commit comments

Comments
 (0)