mirror of https://github.com/zulip/zulip.git
tools: Make sure missing lines in node test coverage are correct.
This commit is contained in:
parent
c4d38c1344
commit
d1408125b2
|
@ -112,10 +112,12 @@ if options.coverage and ret == 0:
|
|||
print("ERROR: %s has no node test coverage" % (relative_path,))
|
||||
continue
|
||||
line_coverage = coverage_json[path]['s']
|
||||
line_mapping = coverage_json[path]['statementMap']
|
||||
missing_lines = []
|
||||
for line in line_coverage:
|
||||
if line_coverage[line] == 0:
|
||||
missing_lines.append(line)
|
||||
actual_line = line_mapping[line]
|
||||
missing_lines.append(str(actual_line["start"]["line"]))
|
||||
if len(missing_lines):
|
||||
print("ERROR: %s no longer has complete node test coverage" % (relative_path,))
|
||||
print(" Lines missing coverage: %s" % (", ".join(sorted(missing_lines, key=int)),))
|
||||
|
|
Loading…
Reference in New Issue