Skip to content

feat: add nutest unit tests for internal commands#84

Merged
maxim-uvarov merged 3 commits into
nushell-prophet:mainfrom
maxim-uvarov-ai-assistant:feat/add-nutest
Dec 11, 2025
Merged

feat: add nutest unit tests for internal commands#84
maxim-uvarov merged 3 commits into
nushell-prophet:mainfrom
maxim-uvarov-ai-assistant:feat/add-nutest

Conversation

@maxim-uvarov-ai-assistant
Copy link
Copy Markdown

Summary

  • Add nutest-based unit tests for internal numd functions (tests/test_commands.nu)
  • Restructure testing commands in toolkit.nu to support both unit and integration tests
  • Update documentation to reflect new testing structure

Changes

  • tests/test_commands.nu: New unit test file with 336 lines covering find-code-blocks, decortate-original-code-blocks, generate-intermediate-script, and other internal functions
  • toolkit.nu: Add testing-unit and testing-integration subcommands, with testing running both
  • CLAUDE.md: Update testing documentation with new command structure
  • README.md: Add testing section documenting how to run tests

Test plan

  • Run nu toolkit.nu testing-unit to verify unit tests pass
  • Run nu toolkit.nu testing-integration to verify integration tests pass
  • Run nu toolkit.nu testing to verify both test suites work together

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.
@maxim-uvarov maxim-uvarov merged commit 042721b into nushell-prophet:main Dec 11, 2025
1 check failed
@maxim-uvarov-ai-assistant maxim-uvarov-ai-assistant deleted the feat/add-nutest branch December 15, 2025 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants