Skip to content

Commit

Permalink
fix: feedback correction and finalise unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestoteo committed Sep 14, 2024
1 parent 7e758f2 commit 5ffe615
Show file tree
Hide file tree
Showing 34 changed files with 149 additions and 16,807 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"name": "Run Jest Tests",
"program": "${workspaceFolder}/node_modules/jest/bin/jest.js",
"args": [
"${workspaceFolder}/test/example.spec.js",
"${workspaceFolder}/test/stock-count.spec.js",
"--runInBand",
"--verbose"
],
Expand Down
82 changes: 49 additions & 33 deletions test/mocks/mocks.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,51 @@
const stockCountScenario = [
'init',
'2_levels',
'c62_chw',
'chw',
'c52_supervisor',
'supervisor',
'Y',
'stock_count',
'[{contact_type: \'c62_chw\', role: \'chw\', place_type: \'c60_chw_site\' },{contact_type: \'c52_supervisor\',role: \'supervisor\',place_type: \'c50_supervision_area\'}]',
'action',
'end_of_week',
['Stock count', 'Stock count'],
'patient_assessment_under_5',
'Y',
'now()',
'malaria',
['Category', 'Categorie'],
['Category', 'Categorie'],
'paracetamol',
['Paracetamol', 'Paracetamole'],
'Y',
['Box of 8', 'Boite de 8'],
8,
['Tablet', 'Comprimes'],
20,
15,
15,
'by_user',
0
];

module.exports = {
stockCountScenario
stockCountScenario: {
initScenario: [
'init',
'2_levels',
'c62_chw',
'chw',
'c52_supervisor',
'supervisor',
'Y',
'stock_count',
'[{contact_type: \'c62_chw\', role: \'chw\', place_type: \'c60_chw_site\' },{contact_type: \'c52_supervisor\',role: \'supervisor\',place_type: \'c50_supervision_area\'}]',
'action',
'end_of_week',
['Stock count', 'Stock count'],
'patient_assessment_under_5',
'Y',
'now()',
'malaria',
['Category', 'Categorie'],
['Category', 'Categorie'],
'paracetamol',
['Paracetamol', 'Paracetamole'],
'Y',
['Box of 8', 'Boite de 8'],
8,
['Tablet', 'Comprimes'],
20,
15,
15,
'by_user',
0
],
productCategoryScenario: [
'malaria'
],
productsScenario: [
'paracetamol___set',
'paracetamol___unit',
'paracetamol',
'paracetamol___count'
]

}
};






Loading

0 comments on commit 5ffe615

Please sign in to comment.