github
504 of 562 branches covered (89.68%)
Branch coverage included in aggregate %.
97 of 103 new or added lines in 10 files covered. (94.17%)
2 existing lines in 1 file now uncovered.2227 of 2331 relevant lines covered (95.54%)
412.76 hits per line
1 |
import Measurement from './measurement/index.js' |
|
2 |
|
31✔ |
|
const metric = name => { |
|
|
const bus = global.universalBus || (() => { |
|
NEW
|
throw new TypeError('Missing Bus() instance on: global.universalBus') |
× |
NEW
|
})() |
× |
|
const record = ({ name, value }) => |
|
8 |
bus.emit(new Measurement({ name, value }))
|
6,241✔ |
9 |
|
6,283✔ |
10 |
return {
|
6,283✔ |
11 |
record: value => record({ name, value }),
|
|
12 |
stop: () => bus.stop()
|
|
13 |
} |
6,283✔ |
14 |
} |
6,283✔ |
15 |
|
31✔ |
16 |
export { metric }
|
31✔ |