[DO NOT MERGE] Code snippet execution (Node.js)#24
Draft
alexcasalboni wants to merge 4 commits intomainfrom
Draft
[DO NOT MERGE] Code snippet execution (Node.js)#24alexcasalboni wants to merge 4 commits intomainfrom
alexcasalboni wants to merge 4 commits intomainfrom
Conversation
|
🌿 Preview your docs: https://unleash-preview-6417cf60-ad64-4b87-abd2-42b6b871e37b.docs.buildwithfern.com |
|
🌿 Preview your docs: https://unleash-preview-0b07b41b-d0a8-43fd-8128-fdb06c794887.docs.buildwithfern.com |
|
🌿 Preview your docs: https://unleash-preview-928fc474-2076-40dd-988b-210b8f5de6f0.docs.buildwithfern.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
About the changes
This is an experiment to evaluate the idea of extracting major code snippets into independent files and run them as a test suite.
I tried an alternative approach with runme, but unfortunately it has too many markdown compatibility issues with Fern and I had to give up the idea of automatically identifying code snippets from the Markdown files. Besides the Fern incompatibility, the other major issue with the runme approach was that most snippets require some setup (like importing libraries), so we'd end up with too many weird hacks.
This is why I went for the "extract all the snippets into executable files" approach.
Pros:
Cons:
<Code>blockImportant files
Discussion points
This is not as low-effort as I thought initially:
Feel free to take a look, run the existing Vite test suite locally, and close the PR if you think this is not worth it :)