feat: add nutest unit tests for internal commands#84
Merged
maxim-uvarov merged 3 commits intoDec 11, 2025
Merged
Conversation
Add comprehensive nutest-based unit tests for core internal functions in commands.nu including find-code-blocks, match-action, extract-fence-options, mark-code-block, clean-markdown, toggle-output-fences, and utility functions. This provides automated testing infrastructure for numd's parsing and transformation pipeline.
…ration tests - Rename original `main testing` to `main testing-integration` - Add new `main testing-unit` command that runs nutest unit tests - Add new `main testing` command that runs both unit and integration tests - All commands support --json flag for structured output
Add documentation for the new testing commands (testing, testing-unit, testing-integration) in both CLAUDE.md and README.md. Clarifies that unit tests use nutest framework and integration tests run example markdown files.
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.
Summary
tests/test_commands.nu)toolkit.nuto support both unit and integration testsChanges
find-code-blocks,decortate-original-code-blocks,generate-intermediate-script, and other internal functionstesting-unitandtesting-integrationsubcommands, withtestingrunning bothTest plan
nu toolkit.nu testing-unitto verify unit tests passnu toolkit.nu testing-integrationto verify integration tests passnu toolkit.nu testingto verify both test suites work together