Last change
on this file since ceaed42 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
371 bytes
|
Line | |
---|
1 | /*
|
---|
2 | Copyright 2012-2015, Yahoo Inc.
|
---|
3 | Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
---|
4 | */
|
---|
5 | 'use strict';
|
---|
6 |
|
---|
7 | module.exports = function percent(covered, total) {
|
---|
8 | let tmp;
|
---|
9 | if (total > 0) {
|
---|
10 | tmp = (1000 * 100 * covered) / total + 5;
|
---|
11 | return Math.floor(tmp / 10) / 100;
|
---|
12 | } else {
|
---|
13 | return 100.0;
|
---|
14 | }
|
---|
15 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.