piqnt / planck.js

2D JavaScript Physics Engine
http://piqnt.com/planck.js/
MIT License
4.87k stars 236 forks source link

test: switch to vitest #252

Closed zOadT closed 1 year ago

zOadT commented 1 year ago

I don't think there is a reason to use the _ASSERT anymore since we switched to TypeScript. In the worst case the variables are undefined which should still be fine for us.

EDIT: Turns out tests can be a problem, but I guess it's a good idea to switch to vitest now anyway? 😅

shakiba commented 1 year ago

When you directly use a global variable and it is undefined, it throws an exception. So the safe way to use them is to first check if they are defined, or do something like process.env.NAME.