๐Ÿ—ƒ๏ธCSVReporter

Comma separate your results.

The CSVReporter can be used to create csv files that contain the test output. The file output location is {testname}.spec.csv. It can be used directly from the configuration file.

It must be installed manually via the CLI.

const { CSVReporter } = require("@as-pect/csv-reporter").default;

// export your configuration
module.exports = {
  reporter: new CSVReporter(),
};

It can also be used from the cli using the --csv flag.

npm install --save-dev @as-pect/csv-reporter
npx asp --csv

This is a list of all the columns in the exported csv file.

const csvColumns = [
  "Group", // The Test Group
  "Name", // The Test Name
  "Ran", // If it ran
  "Pass", // If it passed
  "Runtime", // The total test runtim
  "Message", // The error message
  "Actual", // Actual value message if an expectation failed
  "Expected", // Expected value message if an expectation failed
  "Average", // The average run time (performance)
  "Median", // The median run time (performance)
  "Max", // The maximum run time (performance)
  "Min", // The minimum run time (performance)
  "StdDev", // The standard deviation of the run times (performance)
  "Variance", // The variance of the run times (performance)
];

Last updated