-
Notifications
You must be signed in to change notification settings - Fork 1
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
Only loading includes one level deep? #6
Comments
Hi @mspoulsen, I've investigated a little and have found that Jest is unaware of the dependencies on It appears there is a way to be a way to tell Jest that The hard part I see is generating the list of dependencies. I think you'd have to do some custom compilation of nearley scripts in order to extract the includes. To do this we may need to compile it twice - once to actually compile it, and a second time where we parse it and extract the includes. An alternative might be to generate a cache key for jest based on the compilation results. Disadvantages of this approach include:
What are your thoughts? |
Hi @adam1658 |
I took a look at https://jestjs.io/docs/en/next/configuration#dependencyextractor-string |
I would experiment by copying https://github.com/adam1658/jest-transform-nearley/blob/master/index.js into your app (it's basically the whole transform plugin), then pointing Jest at it instead of the packaged one. Then you can experiment with adding a second export for I'm working on other projects at the moment so don't have a lot of time for this - let me know if you have any success this way. |
Thanks a lot! I will give it a try 👍 |
I did not have any success. Tool much tooling for me 😞 |
Hi,
Is it only loading .ne files one level deep?
I have a.ne that includes b.ne that in turn includes c.ne.
However, when testing a.ne it is not loading updates made to c.ne...?
Thanks!
The text was updated successfully, but these errors were encountered: