fix read path
This commit is contained in:
parent
eb7a4513da
commit
6fe95f9b39
@ -12,14 +12,14 @@ class CoverageReport
|
||||
end
|
||||
|
||||
def self.simplecov(report_path, data)
|
||||
report = JSON.parse(report_path)
|
||||
report = JSON.parse(File.read(report_path))
|
||||
minumum_percent = data[:min]
|
||||
covered_percent = report.dig('result', 'covered_percent')
|
||||
{ 'lines' => { 'covered_percent' => covered_percent, 'minumum_percent' => minumum_percent } }
|
||||
end
|
||||
|
||||
def self.jest(report_path, data)
|
||||
report = JSON.parse(report_path)
|
||||
report = JSON.parse(File.read(report_path))
|
||||
minumum_percent = data[:min]
|
||||
covered_percent = report.dig('result', 'covered_percent')
|
||||
{ 'lines' => { 'covered_percent' => covered_percent, 'minumum_percent' => minumum_percent } }
|
||||
|
||||
Reference in New Issue
Block a user