Skip to content
Kunal Kushwaha edited this page Jun 25, 2020 · 6 revisions

Projects

Reporting of Individual Test cases [WIP]

The best way to understand contributing to the project is a guide that explains the problems when starting off contribution. And what better explanation than the same Issues we went through, and solutions we got for the same.

Common Issues and answers for the same

  • Why do we run JEST_CIRCUS=1 yarn jest instead of yarn jest?

    Jest has good support for plug and play. So, you can add your own test runners if you don't prefer the options provided by default. Jest provides two test runners JEST CIRCUS and JEST JASMINE2 (Jasmine2 is a heavily modified fork of original jasmine project). By default, Jest uses JEST JASMINE. But, for Reporting Individual Test Cases we have added support only for JEST CIRCUS. Hence, we run JEST_CIRCUS=1 yarn jest


  • There are no references for the initialize function from /packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapterInit.ts. It seems kinda confusing why is it present. And why is legacy-todo-write is present altogether, more precisely what legacy code is it serving?

    initialize is called here: https://github.com/facebook/jest/blob/71631f6bf9ccf8937f02a5ecfb64b62712b86c19/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts#L41. Regarding legacy-todo-write, jest-circus is in theory a standalone test runner which could be used outside of jest. The parts in legacy-code-todo-rewrite is code that ties it specifically to Jest and it's APIs due to the way Jest calls it. At some point we hope to refactor this so it's less coupled


  • Are event Emitters supported for third party test runners?

    Unfortunately, nope. This means you are mainly restricted from sending custom-messages to parent by worker-threads, as this process uses event emitters


Clone this wiki locally