7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/ae_test_coverage/collectors/webpacker/helpers.rb', line 7
def javascript_packs_with_chunks_tag(*names, **options)
raise(StandardError, 'AeTestCoverage.config.webpacker_app_locations must be set to collect webpacker app coverage') if AeTestCoverage.config.webpacker_app_locations.blank?
globs = names.flat_map do |name|
app_home = javascript_app_home(name)
raise(StandardError, "Unable to locate source location for javascript app #{name}") unless Dir.exist?(app_home)
[
File.join(app_home, 'src', '**.{scss,css,js}'),
File.join(app_home, 'package*.json')
]
end
AeTestCoverage.coverage_collectors[WebpackerAppCollector].add_covered_globs(*globs)
super
end
|