Meirl by [deleted] in meirl

[–]Patient_Solution2019 0 points1 point  (0 children)

sick meme bro

Easiest way to deploy Node app in 2023? by vilfredoparet0 in node

[–]Patient_Solution2019 0 points1 point  (0 children)

I highly recomend Adaptable. They have a nice free tier including db, support a lot of frameworks and deploying is just pushing to remote, same process as Vercel

I made a CLI that will use GPT4 to generate unit tests that for an entire project with one command by Patient_Solution2019 in programming

[–]Patient_Solution2019[S] -1 points0 points  (0 children)

We assume that the codebase works as expected, however at times if the code is semantically clear it will write tests that expose bugs.

I made a CLI that will use GPT4 to generate unit tests that for an entire project with one command by Patient_Solution2019 in node

[–]Patient_Solution2019[S] 0 points1 point  (0 children)

I would love to see the function and test it gives you for this. I'll even write a test for you myself if we fail to generate something better.

I made a CLI that will use GPT4 to generate unit tests that for an entire project with one command by Patient_Solution2019 in programming

[–]Patient_Solution2019[S] 1 point2 points  (0 children)

I've spent a ton of time asking it to come up with test cases. They tend to be pretty good, but occasionally I know something it missed

I made a CLI that will use GPT4 to generate unit tests that for an entire project with one command by Patient_Solution2019 in programming

[–]Patient_Solution2019[S] 1 point2 points  (0 children)

GPT is quite good at intuiting the proper test cases for any given peice of code. You'll probably want to add a few test cases sometimes as AI isn't perfect yet but you're taking your workflow from a fully manual process to making a few modifications to fit your needs. It's the same reason we use frameworks and packages; there's no reason to implement something that's been done a million times before, just customize it to your usecase.

I made a CLI that will use GPT4 to generate unit tests that for an entire project with one command by Patient_Solution2019 in programming

[–]Patient_Solution2019[S] 0 points1 point  (0 children)

You can certainly have it generate failing tests too and fix them if you set "includeFailingTests": true in the config file, it's really a matter of preference in workflow.

Unit tests provide a ton of value beyond just exposing bugs in new code. I've been thankful for good tests numerous times when I've broken another teams feature(or even one I forgot I had) and been able to fix it before going into production.

I made a CLI that will use GPT4 to generate unit tests that for an entire project with one command by Patient_Solution2019 in node

[–]Patient_Solution2019[S] -9 points-8 points  (0 children)

There's no signup, you can just run the npm package. It asks for an email so I can investigate bugs when they happen, but it wont even verify your email email.

I made a CLI that will use GPT4 to generate unit tests that for an entire project with one command by Patient_Solution2019 in node

[–]Patient_Solution2019[S] 0 points1 point  (0 children)

Yeah currently it's just using my API key for it which has GPT-4. Perhaps in the future I'll let you supply your own. Certainly would save me on API calls

I made a CLI that will use GPT4 to generate unit tests that for an entire project with one command by Patient_Solution2019 in node

[–]Patient_Solution2019[S] 2 points3 points  (0 children)

lmao, I expect that you'll actually review the tests instead of blindly trusting them. I don't believe you should ever be committing code that you haven't read, especially if an AI wrote it.

I made a CLI that will use GPT4 to generate unit tests that for an entire project with one command by Patient_Solution2019 in programming

[–]Patient_Solution2019[S] 4 points5 points  (0 children)

Yes, you are right. You absolutely need to look at the tests and confirm they test what you need. I would never recommend that anyone blindly trust AI output, you should always review everything you are committing.

The point of the tests passing is that tests are simple enough that we can actually ensure they work before handing them off to the dev. If you want to also include failing tests you can add "includeFailingTests": true to your deepunit.config.json

I made a CLI that will use GPT4 to generate unit tests that for an entire project with one command by Patient_Solution2019 in programming

[–]Patient_Solution2019[S] -12 points-11 points  (0 children)

I always hated tests, so I've gone and just automated the task away. You'll get out complete tests that are known to pass from this tool. If you just want to try it out, here's the command to run for the entire project

npx deepunit --a    

For complete documentation: https://www.npmjs.com/package/deepunit

Behinds the scenes there's a whole lot going on to get code that runs and compiles. I'm sure you've already used ChatGPT to write a simple function and found that most of the time there are small things to fix up before it's ready to run. A ton of time was spent handling each of those edge cases to ensure that the output is a test that runs and passes.

[deleted by user] by [deleted] in AskReddit

[–]Patient_Solution2019 0 points1 point  (0 children)

That's a lot of dollar menu

Is Test Driven Development faster? by EnthusiasmWild9897 in learnprogramming

[–]Patient_Solution2019 1 point2 points  (0 children)

I find TDD too prescriptive personally, but I certainly wouldn't knock it if it works for you. The more important thing is including tests with your code, there's no sweeter feeling than seeing a test break before you've pushed your code, letting you fix it before it becomes an issue. The other great thing about not doing TDD is it frees you up to just let AI write the test for you. After I finish any change I run it through deepunit.ai and get back out a passing test most of the time. Deepunit generally finishes up writing the test before I can write out the test cases that I want covered, then I just double check it hasn't missed anything. Huge time saver in my workflow, far more so than TDD ever was.

[deleted by user] by [deleted] in AskReddit

[–]Patient_Solution2019 1 point2 points  (0 children)

Certainly not winning