-
Notifications
You must be signed in to change notification settings - Fork 386
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
[SPIKE] Basic Environments Testing #147
[SPIKE] Basic Environments Testing #147
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Apply Sweep Rules to your PR?
|
Looking at some prior art from the environment testing in langchainjs, it seems they primarily focus on testing static imports, dynamic imports, and certain internal methods related to vectors and their CSV loader. We could adopt a similar strategy, which would allow us to avoid the complexities of mocking or making actual queries within the fixtures. |
Thanks for doing this @casesandberg. I agree yeah the primary test should be about imports and exports working. The one issue with testing the output of the LLMs directly is that they're non-deterministic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to merge this. Thanks!
So the first time I run
and then on subsequent times I get this:
|
@yisding I wonder if its because the dependencies aren't installed for the fixture app. Let me look into it. May just need to increase the timeout for that setup. |
@yisding Its likely that the cold start of the next server was straddling the timeout, so I increased it. The warning about a worker process not exiting gracefully was from that first attempt you made where it timed out and didn't clean itself up. Its safe to ignore that and will go away. |
OK so it's still hanging CI and giving me that error. Command: I tried I think maybe Jest might not be the right runner for these tests and maybe we should just go to using a shell script or something. |
9992494
to
e3ab07e
Compare
e3ab07e
to
92ec7b6
Compare
Thanks for working with me on this. Turns out its tricky to spawn nextjs from within jest from within turbo. You were on the right path with cleaning up the fixture. Turns out the Next app spawns a bunch of child processes and |
This isn't an exhaustive list, but mainly a showcase of various examples that can be utilized for testing both runtimes and frameworks. Let me know what you think about the direction. I believe this pattern can be applied to test most of the environments we've discussed.
Approach:
I adopted a "real-world scenario" approach. Instead of mocking or simulating environments, I set up actual projects (fixtures) for each environment. The tests then interact with these projects, running them, linking the built package, and checking for expected behaviors.
TODO:
next-app
test.