Skip to content

Conversation

kelleyma49
Copy link
Owner

This commit allows passing an optional query parameter to the Invoke-FuzzyZLocation function. This query is then used as the initial query for fzf.

The documentation and tests have been updated to reflect this change.

Fixes #295

google-labs-jules bot and others added 5 commits June 26, 2025 16:21
This commit allows passing an optional query parameter to the
`Invoke-FuzzyZLocation` function. This query is then used as the
initial query for fzf.

The documentation and tests have been updated to reflect this change.

Fixes #295
Refactors the tests for `Invoke-FuzzyZLocation` to more accurately
mock the behavior of `Invoke-Fzf` when it receives pipeline input,
particularly in the Pester environment where `ForEach-Object` might cause
the mock to be invoked multiple times.

- Ensures `Get-ZLocation` is always mocked to provide consistent test
  data for these specific tests, making them independent of the actual
  ZLocation database state.
- The `Invoke-Fzf` mock now correctly simulates accumulation of all
  pipeline input before returning a result, even if its `begin/process/end`
  blocks are run multiple times by Pester for a single logical pipeline.
- Assertions now verify the fully collected input and parameters passed
  to `Invoke-Fzf`.
@kelleyma49 kelleyma49 merged commit ce8c6c6 into master Jun 26, 2025
3 checks passed
@kelleyma49 kelleyma49 deleted the feat/fuzzyzlocation-query branch June 27, 2025 15:53
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.

Invoke-FuzzyZLocation - Should accept an optional parameter as query

1 participant