TypeScript Unit Testing?

Hello there, I was wondering if there is a convenient way to (unit) test nodejs scripts made in typescript? I’ve tinkered around with testing libraries, such as jest, but I had issues mocking natives. If anyone knows a solution to this, please let me know! It’s greatly appreciated. :slight_smile:

Hey! You can mock natives in both jest and mocha. You just have to use the global prefix. for example:
global.PlayerPedId = () => 10
or if you want to spy on stuff (e.g using jest’s built in spies) you can do what you would regularly do.
let me find an example file real quick, will post it here.