refactor: standardize integration tests with run-snapshot-test helper#35
Merged
maxim-uvarov merged 13 commits intomainfrom Dec 31, 2025
Merged
refactor: standardize integration tests with run-snapshot-test helper#35maxim-uvarov merged 13 commits intomainfrom
maxim-uvarov merged 13 commits intomainfrom
Conversation
Uses dotnu's own filter-commands-with-no-tests to track which public API commands lack test coverage. Outputs a snapshot that will show changes in git diff when coverage changes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Consolidates the self-documenting snapshot pattern (command source as header comment + output) into a reusable helper. Reduces duplication in dependency tests from 40 lines to 10. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace hardcoded forward-slash paths with path join for cross-platform support. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Eliminates duplicate mkdir/rm/save boilerplate. Coverage snapshot now includes the generating code as header comments. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Explains the git-as-assertion pattern and self-documenting snapshots for future maintainers. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Convert test-embeds-remove and test-embeds-update to use the shared helper - Output files now include self-documenting command headers - Fix typo in filename: keep_bulitins -> keep_builtins 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Keywords like `def` and `export def` have shape `shape_internalcall` in the AST, causing them to incorrectly appear as callees when using --keep-builtins. Now keywords are always filtered out regardless of the --keep-builtins flag. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Glob returns files in different order on different platforms (Linux vs Windows vs macOS). Adding explicit sort ensures consistent output order for dependencies command across all platforms. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Unix-style paths like "tests/test_commands.nu" may not work correctly on Windows. Using path join ensures glob patterns work across all platforms. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
6d06713 to
afd119e
Compare
…ge test" This reverts commit afd119e.
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
run-snapshot-testhelper for consistent snapshot-based integration testingkeep_bulitins→keep_builtinsCross-platform fixes
defandexport deffrom callees (they haveshape_internalcallin AST but are keywords, not command calls)dependenciescommand for consistent output across platforms (glob returns different order on Linux vs Windows vs macOS)path joinfor glob patterns in coverage test instead of Unix-style hardcoded pathsTest plan
nu toolkit.nu testpasses (44 unit + 5 integration tests)🤖 Generated with Claude Code