ethereumjs/ethereumjs-client

Update test suite / Fix deactivated tests along TypeScript transition

Closed this issue · 3 comments

Many tests of the library have been deactivated during the TypeScript transition #144 to keep the test suite passing. One main problem was the usage of the testdouble mockup library, which plays not very well with an ES6 / TypeScript combination. There is some added ES6 support in newer versions, but this implies the replacement of the whole Node module loader, which is just too much of an intervention and should be avoided for a test setup here just for the sake of having a mockup library working.

The following is a list of tests being deactivated:

These tests should be reactivated over time. 😀

It would be good if this can be done along with having a look and (re-)consider what functionality is actually tested and not just trying to bring everything back to life. Some tests might also be too trivial now in aTypeScript environment and it might be more appropriate to just remove. For some tests it might be useful to rather replace with alternative test scenarios than just trying to replicate the old testing functionality.

On the specific testdouble issue it might be worth to have a look into alternative mockup libraries (Sinon.js seemed not to be such a suited candidate, see comment here), another way might be to just use manually created / manual mocks where necessary or see what hinders the setup to just use the respective original class.

Just a status note: am currently working on lib/blockchain (integrating the latest monorepo releases). It's not listed above but its dependency problems are (likely) causing the karma tests to fail.

@cgewecke Ok, have opened an issue #156 to support this and have some reference, had planned to do this anyhow once the releases are out. I've also assigned @rumkin, you should likely coordinate a bit if one of you want to tackle something specific.

Closed by #182, thanks @ryanio 😄