UNPKG

cypress-csv2html-plugin

Version:

A simple plugin to generate HTML table from CSV file by using cy.csv2html('/fixtures/yourfile.csv'), all the data is randomly generated

15 lines (12 loc) 401 B
// cypress/support/cypress.d.ts /// <reference types="cypress" /> // Extending the Cypress namespace to include the csv2html command declare namespace Cypress { interface Chainable<Subject = any> { /** * Custom command to read a CSV file and display it as an HTML table * @param csvFilePath - The path to the CSV file */ csv2html(csvFilePath: string): Chainable<void> } }