jeudi 5 septembre 2019

Why aren't simulated events firing on a React module included as a dependency?

I'm refactoring a large React project (https://github.com/bootstrapworld/codemirror-blocks) into modules, into a core library which is included and extended by the other modules (e.g. - https://github.com/bootstrapworld/pyret-blocks).

I have a large test suite in the monolithic repo, which passes just fine. In the refactored setup, those same tests fail when they involve simulated (via React-TestUtils) key events.

Some debugging is showing that these events aren't being received by the core library at all. The event handlers simply don't get called at all. However, running the actual app works just fine, with all real events being handled correctly.

There aren't any error messages - Karma tests just fail, with no output other than the Karma output.

Aucun commentaire:

Enregistrer un commentaire