csv-to-sql-insert icon indicating copy to clipboard operation
csv-to-sql-insert copied to clipboard

Add testing with jest

Open gitdagray opened this issue 1 year ago • 5 comments

Add jest and write tests.

gitdagray avatar Dec 22 '23 17:12 gitdagray

Hey David, sure I will work on this tomorrow.

Maanu07 avatar Dec 22 '23 19:12 Maanu07

I'd like to suggest using Vitest instead of Jest, in general, it's nicer, faster and lighter, also, it's API is Jest-compatible. [Why | Comparison | Size: Vitest - Jest]

leonardogattidev avatar Dec 22 '23 23:12 leonardogattidev

I'd like to suggest using Vitest instead of Jest, in general, it's nicer, faster and lighter, also, it's API is Jest-compatible. [Why | Comparison | Size: Vitest - Jest]

I agree, but I think using Vitest make much sense if you are using vite as your tool, but since our this application is entirely nodejs based and I think there will be not much things to tests, so it won't be a bad idea to use jest instead. Do let me know what you say?

Maanu07 avatar Dec 23 '23 03:12 Maanu07

Even outside of projects using Vite, those advantages still stand, and, I'm unaware of any known problems with it (do let me know if there are any).

Still, feel free to use what you're comfortable with, the difference is not that big and may not be worth the trouble, the configuration (file) is different from Jest, so that would be one more thing to learn, also, due to Jest being more battle tested it may be easier to find documentation if things go wrong.

leonardogattidev avatar Dec 23 '23 04:12 leonardogattidev

HI @gitdagray Has this been done? I dont mind working on this and adding the test

godwintrav avatar Sep 06 '24 23:09 godwintrav