etherpad-lite icon indicating copy to clipboard operation
etherpad-lite copied to clipboard

Feat/frontend vitest

Open SamTV12345 opened this issue 1 year ago • 5 comments

SamTV12345 avatar Jun 23 '24 12:06 SamTV12345

Hi @AugustinMauroy maybe you have an idea why the vitest tests don't work. I ported settings.spec.ts to the new directory for tests but it is complaining about not finding a module. Do you know why?

SamTV12345 avatar Jun 23 '24 12:06 SamTV12345

Heyyy ! how dit you call test, I mean which command did you use ?

AugustinMauroy avatar Jun 23 '24 13:06 AugustinMauroy

Heyyy !

how dit you call test, I mean which command did you use ?

Hey :). Thanks for helping me out. It's npx vitest --config vitest.config.ts

SamTV12345 avatar Jun 23 '24 13:06 SamTV12345

Ok I got it ! it's because vitest cannot make esm and cjs in same time so when you still have require you I'll need to use import

AugustinMauroy avatar Jun 25 '24 09:06 AugustinMauroy

Ok I got it ! it's because vitest cannot make esm and cjs in same time so when you still have require you I'll need to use import

Thanks. I'll check if import works :).

SamTV12345 avatar Jun 29 '24 18:06 SamTV12345