pg-boss icon indicating copy to clipboard operation
pg-boss copied to clipboard

More modern testing framework?..

Open kibertoad opened this issue 3 weeks ago • 5 comments

Mocha is pretty clunky to work with, and current setup doesn't work well with IDEs.

Have you considered switching to something more modern, like vitest or node:test?

kibertoad avatar Dec 02 '25 23:12 kibertoad

I evaluated another framework only once in the 10 years that this project has been alive, so I would assume there are far more alternatives to consider than mocha these days. :) Do you have a favorite?

timgit avatar Dec 03 '25 00:12 timgit

@timgit personally I am a big fan of vitest, it has great DX.

kibertoad avatar Dec 03 '25 08:12 kibertoad

@timgit personally I am a big fan of vitest, it has great DX

Sounds good to me

current setup doesn't work well with IDEs.

What do you mean by this?

timgit avatar Dec 03 '25 16:12 timgit

this:

Image

I'll prepare the vitest switch PR then, but would be nice to land https://github.com/timgit/pg-boss/pull/657 first

kibertoad avatar Dec 03 '25 16:12 kibertoad

Ah, Webstorm. Is this because mocha doesn't support typescript yet? Regardless, I'm not married to Mocha, so I'm interested in any benefits vitest can provide, having the benefit of being shiny and new.

timgit avatar Dec 03 '25 16:12 timgit