refactoring
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
QUnit.module('PrrByKey2CsvConverterTest', function () {
|
||||
|
||||
QUnit.test('convertPrrByKey2Csv', function (assert) {
|
||||
// Given
|
||||
const prrByKey = {
|
||||
"MM,R": 26.17432376240791,
|
||||
"VARCEL": 10.549534724816644
|
||||
};
|
||||
|
||||
// When
|
||||
const csv = PrrByKey2CsvConverter.convertPrrByKey2Csv(
|
||||
{
|
||||
heading: '# Symptom: Acute hepatitis C',
|
||||
columns: {
|
||||
keyColumn: 'Vaccine',
|
||||
prrColumn: 'Proportional Reporting Ratio'
|
||||
},
|
||||
prrByKey: prrByKey
|
||||
});
|
||||
|
||||
// Then
|
||||
const csvExpected =
|
||||
`# Symptom: Acute hepatitis C
|
||||
|
||||
"Vaccine","Proportional Reporting Ratio"
|
||||
"MM,R",26.17432376240791
|
||||
"VARCEL",10.549534724816644`;
|
||||
assert.equal(csv, csvExpected);
|
||||
});
|
||||
});
|
||||
37
docs/SymptomsCausedByVaccines/test/index.test.html
Normal file
37
docs/SymptomsCausedByVaccines/test/index.test.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
||||
<!-- Meta, title, CSS, favicons, etc. -->
|
||||
<meta charset="utf-8" />
|
||||
<meta content="IE=edge" http-equiv="X-UA-Compatible" />
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||||
<title>Symptoms caused by Vaccines</title>
|
||||
<script src="../../Utils.js"></script>
|
||||
<script src="../../UIUtils.js"></script>
|
||||
<script src="../../NumberWithBarElementFactory.js"></script>
|
||||
<script src="../js/PrrByKey2CsvConverter.js"></script>
|
||||
<script src="../js/PageInitializer.js"></script>
|
||||
<script src="../js/PrrByVaccineProvider.js"></script>
|
||||
<script src="../js/PrrByKeyTable.js"></script>
|
||||
<script src="../js/PrrByKeyTableView.js"></script>
|
||||
<script src="../js/PrrByVaccineTableView.js"></script>
|
||||
<script src="../js/PrrBySymptomTableView.js"></script>
|
||||
<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-2.17.2.css">
|
||||
<script src="https://code.jquery.com/qunit/qunit-2.17.2.js"></script>
|
||||
<script type="text/javascript" src="./jshamcrest.js"></script>
|
||||
<script type="text/javascript" src="./jsmockito-1.0.4.js"></script>
|
||||
<script>
|
||||
JsHamcrest.Integration.QUnit();
|
||||
JsMockito.Integration.QUnit();
|
||||
</script>
|
||||
<script src="./PrrByKey2CsvConverterTest.js"></script>
|
||||
</head>
|
||||
|
||||
<body class="nav-md">
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
1500
docs/SymptomsCausedByVaccines/test/jshamcrest.js
Normal file
1500
docs/SymptomsCausedByVaccines/test/jshamcrest.js
Normal file
File diff suppressed because it is too large
Load Diff
1019
docs/SymptomsCausedByVaccines/test/jsmockito-1.0.4.js
Normal file
1019
docs/SymptomsCausedByVaccines/test/jsmockito-1.0.4.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user