damage-calc icon indicating copy to clipboard operation
damage-calc copied to clipboard

Unit tests fail

Open MagiaSN opened this issue 3 years ago • 4 comments

Hi friends, I am going to write some code but find the unit tests keep failing. This is my current situation:

First, I pulled the latest commit, run npm install and then npm test, which reported 2 failures. One failure is because of data inconsistent with @pkmn/dex (some Max Moves do not have breaksProtect property in pkmn). The other is because the bundle script use wrong index in slicing. I can fix these and propose a pull request later.

Then, when I ran npm test, the tests were still failing. The error occurred when bundle.test.ts ran bundled code with eval, because the bundled code used relative imports (e.g. require('./desc')) but bundle.test.ts was not in the same directory as imported modules. I checked out the commit where the test is first committed, reinstalled all dependencies and the tests still failed. This test would never pass IMHO.

So could you show me how to get the tests passed? What am I missing?

MagiaSN avatar Mar 23 '21 16:03 MagiaSN

@KrisXV probably time for a update / sync ?

AustinXII avatar Mar 23 '21 16:03 AustinXII

Yes I was waiting until the end of March since I had already procrastinated so long but I’ll do one today

KrisXV avatar Mar 23 '21 16:03 KrisXV

@MagiaSN also long time no see, glad to see you are still working on some calc related adventures. :)

AustinXII avatar Mar 23 '21 17:03 AustinXII

Waiting for your news :)

MagiaSN avatar Mar 24 '21 02:03 MagiaSN

Shouldn't be a problem anymore

monsanto avatar Jan 08 '23 01:01 monsanto