anthonyivn
04/15/2024, 6:14 PManthonyivn
04/15/2024, 6:19 PMreadStandaloneTestsFile method in testCases.ts seems like all of the files are being parsed into rows of `TestCase`s through the testCaseFromCsvRow method
export function testCaseFromCsvRow(row: CsvRow): TestCase {
const vars: Record<string, string> = {};
const asserts: Assertion[] = [];
const options: TestCase['options'] = {};
let providerOutput: string | undefined; // Change made
let description: string | undefined;
for (const [key, value] of Object.entries(row)) {
if (key.startsWith('__expected')) {
if (value.trim() !== '') {
asserts.push(assertionFromString(value));
}
} else if (key === '__prefix') {
options.prefix = value;
} else if (key === '__suffix') {
options.suffix = value;
} else if (key === '__description') {
description = value;
} else if (key === 'provider_output') { // Change made
providerOutput = value; // Change made
} else {
vars[key] = value;
}
}
return {
vars,
...(providerOutput ? { providerOutput } : {}), // Change made
assert: asserts,
options,
...(description ? { description } : {}),
};
}
I think doing the above change would work for this. @ian what do you think about this?anthonyivn
04/15/2024, 6:19 PM// change made to the lines I added to the codeanthonyivn
04/15/2024, 6:23 PManthonyivn
04/15/2024, 6:24 PMproviderOutput value in the input filesanthonyivn
04/15/2024, 6:30 PMpragyadaga
04/15/2024, 6:36 PManthonyivn
04/15/2024, 6:37 PManthonyivn
04/15/2024, 6:37 PMpragyadaga
04/15/2024, 6:37 PManthonyivn
04/15/2024, 6:38 PManthonyivn
04/16/2024, 1:45 AM