From 81b6583d28efe82b5267c981a2ce73cd6da60cb6 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Thu, 3 Sep 2020 11:20:34 +0000 Subject: [PATCH] node tests: Show coverage link when we regress coverage. In 6653e19e3aa5f8f9128a2507cf5b43c15b056d67 we added the convenient line to tell folks about the coverage report. But if we failed coverage checks, we didn't show the link. Arguably we should just always show this, even if tests fail, but that can also be potentially confusing. --- tools/test-js-with-node | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/test-js-with-node b/tools/test-js-with-node index fcefc3d301..6ad5f4dd9c 100755 --- a/tools/test-js-with-node +++ b/tools/test-js-with-node @@ -341,12 +341,12 @@ if options.coverage and ret == 0: if problems_encountered: ret = 1 + reports_location = f"http://{get_dev_host()}/node-coverage/index.html" + print() + print("View coverage reports at " + CYAN + reports_location + ENDC) + print() if ret == 0: - if options.coverage: - reports_location = f'http://{get_dev_host()}/node-coverage/index.html' - print('View coverage reports at ' + CYAN + reports_location + ENDC) - print(GREEN + "Test(s) passed. SUCCESS!" + ENDC) else: print(BOLDRED + "FAIL - Test(s) failed" + ENDC)