I recently encountered a JS file containing SVG code that is incorrectly detected as image/svg+xml instead of application/javascript.
Here is an illustration of the problem using an empty SVG image.
Marcel::MimeType.for StringIO.new(<<~JS)
window.el495_s4oco3nfv=`<?xml version="1.0" encoding="utf-8"?><svg version="1.1" xmlns="http://www.w3.org/2000/svg">...</svg>`;
JS
=> "image/svg+xml"