Unit tests for bilirubin pretty printing
This commit is contained in:
parent
af54b53fd2
commit
4b13e48e9f
|
@ -74,3 +74,18 @@ suite('Days and hours display', () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
suite('Bilirubin display', () => {
|
||||||
|
test('< 10 micromol/L', () => {
|
||||||
|
assert.equal(prettyPrintBilirubin(0), '0.0');
|
||||||
|
assert.equal(prettyPrintBilirubin(0.420), '0.4');
|
||||||
|
assert.equal(prettyPrintBilirubin(3.1415), '3.1');
|
||||||
|
assert.equal(prettyPrintBilirubin(3.99), '4.0');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('>= 10 micromol/L', () => {
|
||||||
|
assert.equal(prettyPrintBilirubin(42), '42');
|
||||||
|
assert.equal(prettyPrintBilirubin(90.210), '90');
|
||||||
|
assert.equal(prettyPrintBilirubin(90.99), '91');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in New Issue