gitdagray / csv-to-sql-insert

Provide table data as a CSV (comma-separated values) file and output a SQL insert statement for a table with the same name as the file.
MIT License
99 stars 120 forks source link

Testing branch -This request applies to issue #4- Add testing with jest #81

Open Dagogo-Clinton-Uranta opened 7 months ago

Dagogo-Clinton-Uranta commented 7 months ago

I have added the jest library, along with babel files for appropriate compiling. I wrote tests in Jest, mainly for the "writeSQL" function, as the "readCSV" function ultimately calls upon it. I hope that this can be a useful starting point for other jest tests to be included :) .

socket-security[bot] commented 7 months ago

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@babel/preset-env@7.23.8 environment Transitive: filesystem, shell, unsafe +162 14.9 MB nicolo-ribaudo
npm/@types/jest@29.5.11 Transitive: environment, filesystem, unsafe +50 5.67 MB types
npm/babel-jest@29.7.0 environment Transitive: eval, filesystem, network, shell, unsafe +149 17.6 MB simenb
npm/jest@29.7.0 Transitive: environment, eval, filesystem, network, shell, unsafe +290 56.5 MB simenb
npm/ts-jest@29.1.1 environment, filesystem, unsafe Transitive: eval, network, shell +293 56.9 MB kul
npm/ts-node@10.9.2 environment, filesystem, unsafe +19 38.1 MB blakeembrey

View full report↗︎