Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Transformers as modules #7279

Closed
wants to merge 2 commits into from
Closed

[WIP] Transformers as modules #7279

wants to merge 2 commits into from

Conversation

yordis
Copy link
Contributor

@yordis yordis commented Oct 26, 2018

Summary

Related to #7135

Test plan

It should not treat the transformer
as a string
Since we are passing an object instead
of a string with the module name. We
should not try to resolve
@yordis
Copy link
Contributor Author

yordis commented Oct 26, 2018

@SimenB I probably facing the issue that you mentioned about serializing the config back and forward because this line keep failing https://github.com/facebook/jest/blob/8a7b4a9df0759142d148cf2f69ec3f23457c542e/packages/jest-runtime/src/script_transformer.js#L161

I checked my object and my keys gets clean up

My original object is

{ canInstrument: true,
  getCacheKey: [Function: getCacheKey],
  process: [Function: process] }

But there is only

{ canInstrument: true }

Which I am assuming that somebody in the middle is cleaning up the object somehow.

But, two things

  1. How can I at least throw an error so I can see the stack trace and trace back how I got there. Right now it is painful to figure out things because my console keeps getting cleaning up.

  2. How can I turn this auto terminal cleaning up thing?

Give me some directions please.

@yordis
Copy link
Contributor Author

yordis commented Oct 26, 2018

Up to this point the config is fine https://github.com/facebook/jest/blob/d481defb350947eba0ebb0e597f7c67e13fd6159/packages/jest-cli/src/reporters/coverage_reporter.js#L171

When the worker starts here https://github.com/facebook/jest/blob/d481defb350947eba0ebb0e597f7c67e13fd6159/packages/jest-cli/src/reporters/coverage_worker.js#L36

I can't see my console logs so I can't verify that the serialization is happening fine but probably the issue is there.

I never deal with workers before so I am not sure what to do

@jharris4
Copy link

Hi there, just letting you know I just made a PR that looks pretty similar to this one: #7398

@yordis
Copy link
Contributor Author

yordis commented Nov 22, 2018

@jharris4 it seems that you got further than me maybe I should close this one if you believe you are almost done.

Thoughts?!

@jharris4
Copy link

@yordis My PR adds the feature that I need to make using jest simple and easy for my use cases. So in that sense it is "done". :-)

I don't have a strong opinion on whether your PR should be closed in favour of mine, but perhaps you could take a look at my PR and let me know if there's anything it's missing for your requirements?

@yordis
Copy link
Contributor Author

yordis commented Nov 22, 2018

Closing in favor of #7398

@yordis yordis closed this Nov 22, 2018
@rickhanlonii
Copy link
Member

Thanks @yordis!

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants