jsvat icon indicating copy to clipboard operation
jsvat copied to clipboard

Run unit tests against TypeScript files

Open wilgert opened this issue 4 years ago • 3 comments

Currently unit tests are ran against one of the generated JavaScript bundles. I think we want to run our tests against the TypeScript files, this will also give us insight into the code coverage.

wilgert avatar Apr 17 '20 08:04 wilgert

Well, honestly I already do it in one click in WebStorm.

I think that it's a kind of extra to have a lot of npm tasks in package.json such as "test:netherlands", "test:malta", etc.

What is your suggestion?

se-panfilov avatar Apr 17 '20 19:04 se-panfilov

Also I'd like to mention that existed tests are not really unit tests - they are functional tests, which test how the lib works against certain list of VAT in certain situations.

So I don't think that we can talk about the "coverage" atm: we don't have unit tests

se-panfilov avatar Apr 17 '20 19:04 se-panfilov

Also, you can run tests from you cli like this:

jest --testNamePattern=^Andorra

se-panfilov avatar Apr 22 '20 09:04 se-panfilov