test(benchmark): overhaul generation

This commit is contained in:
Johann Schopplich
2025-11-06 14:45:44 +01:00
parent 9863875706
commit bc711ccecf
19 changed files with 2254 additions and 997 deletions

View File

@@ -1,3 +1,4 @@
import type { Dataset } from './types'
import { stringify as stringifyCSV } from 'csv-stringify/sync'
import { XMLBuilder } from 'fast-xml-parser'
import { stringify as stringifyYAML } from 'yaml'
@@ -75,3 +76,14 @@ function toXML(data: unknown): string {
return builder.build(data)
}
/**
* Check if a dataset supports CSV format
*
* @remarks
* CSV is only suitable for flat tabular data. Datasets with nested structures
* should not be compared using CSV as it cannot properly represent the data.
*/
export function supportsCSV(dataset: Dataset): boolean {
return dataset.metadata.supportsCSV
}