Skip to content
Snippets Groups Projects
Commit 9e294a17 authored by Emmanuel Raviart's avatar Emmanuel Raviart
Browse files

Handle comparison in linked_variables

parent 09829c0b
No related branches found
No related tags found
No related merge requests found
......@@ -46,10 +46,10 @@
"type-check:watch": "npm run type-check -- --watch"
},
"dependencies": {
"@auditors/core": "^0.6.0",
"@auditors/core": "^0.7.0",
"core-js": "^3.12.1",
"js-yaml": "^4.1.0",
"regenerator-runtime": "^0.13.7"
"regenerator-runtime": "^0.14.0"
},
"devDependencies": {
"@babel/cli": "^7.12.10",
......
......@@ -20,8 +20,16 @@ export type Situation = {
[entityKeyPlural: string]: { [populationId: string]: PopulationWithoutId }
} & {
description?: string
/// Name of variables that this test case illustrates.
linked_variables?: string[]
/** ID generated from test case filename, without the ".json" extension */
id?: string
/** Name of variables that this test case illustrates */
linked_variables?: {
[variableName: string]: Array<{
description?: string
/** optional ID of a situation that must be compared to this situation for this variable */
compare_to?: string
}>
}
title?: string
}
......
......@@ -42,6 +42,7 @@ async function main() {
const testCase = (await fs.readJson(
path.join(testCasesDir, testCaseFilename),
)) as Situation
testCase.id = testCaseFilename.replace(/\.json$/, "")
testCases.push(testCase)
}
await fs.writeJson(path.join(options.jsonDir, `test_cases.json`), testCases, {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment