We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed1f3a7 commit bc563f4Copy full SHA for bc563f4
app/helpers/importmap_mocha/test_helper.rb
@@ -1,13 +1,10 @@
1
module ImportmapMocha::TestHelper
2
def testcase
3
- s = files.map do |f|
4
- javascript_import_module_tag(f.basename('.js'))
5
- end
6
- s.join('').html_safe
+ files.map{|m| javascript_import_module_tag(m.to_s.sub('.js', '')) }.join("\n").html_safe
7
end
8
9
def files
10
- root_path.flat_map{|path| path.glob('**/*.js')}
+ root_path.flat_map{|path| path.glob('**/*.js').map{|m| m.relative_path_from(path)}}
11
12
13
def root_path
0 commit comments