-
Notifications
You must be signed in to change notification settings - Fork 77
Add v6 preview docs #316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add v6 preview docs #316
Changes from 22 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
825cf73
Version v5 docs and keep as latest
fflaten 1c2a46c
Set ident size to 2 spaces for js and ts files
fflaten 57ff457
Generate PesterConfiguration section on Configuration page
fflaten 0542e01
Update configuration docs
fflaten c677f03
Update installation requirements
fflaten a9d89b0
Rename PesterConfiguration docs script
fflaten 191bdaa
Update Command Reference to 6.0.0-alpha1
fflaten c77fd38
Update Command Reference from unreleased build
fflaten ae8126f
Update TestRegistry to remove guid-reference
fflaten 74943bf
Update TestDrive
fflaten a726d84
Redirect versioned URIs for lastVersion
fflaten 4702505
Make versioned redirect temporary to avoid indexing
fflaten 225d58d
Use /docs/v6 paths during preview
fflaten 2f812bd
Fix launch config for devcontainer use
fflaten f46d510
Use New-PesterConfiguration in usage-docs
fflaten 67107f7
Scaffold new migration guide to v6
fflaten 31dd613
Remove new in 5.x references and outdated workarounds
fflaten cf86c29
Update generate-command-reference.ps1
fflaten 4430817
Add PesterConfiguration docs for v5
fflaten c2fd294
Add manual workflow to automate docs update
fflaten 9954bb9
Update generate-command-reference.ps1
fflaten fde83e8
Update workflow
fflaten 4a62154
Fix version references and minor updates
fflaten a6568d1
Update mocking function in method example
fflaten 872c414
Update TestRegistry example to v5+
fflaten 3b5a250
Add WIP docs for v6 assertions
fflaten 68bffbe
Fix table overflow on mobile in Configuration.mdx
fflaten 4057293
Use fully qualified options names
fflaten abe251f
Update v5 PesterConfiguration docs
fflaten 0c1dba2
Update docs/usage/configuration.mdx
fflaten 98639d7
Update breaking changes in v6
fflaten 1683785
Add notice about empty or null data
fflaten 8507081
Update docs/migrations/v5-to-v6.mdx
nohwnd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: Update Pester Docs | ||
run-name: Update Pester ${{ github.event.inputs.docs_version }} docs to v${{ github.event.inputs.pester_version }} | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
docs_version: | ||
description: 'Docs version to update' | ||
required: true | ||
default: 'v5' | ||
type: choice | ||
options: | ||
- Current | ||
- v5 | ||
- v4 | ||
pester_version: | ||
description: 'Pester version to use for docs generation. Format: 5.6.0 or 6.0.0-alpha1' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
generate_docs: | ||
name: Docs PR | ||
runs-on: ubuntu-latest | ||
env: | ||
PESTER: ${{ github.event.inputs.pester_version }} | ||
DOCS: ${{ github.event.inputs.docs_version }} | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- name: Validate Pester version input | ||
run: | | ||
echo "Validating that the provided pester_version input is a valid version-format (x.y.z or x.y.z-suffix)" | ||
echo "${{ env.PESTER }}" | grep -P '^\d+.\d+.\d+(?:-\w+)?$' | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
# This step will also install and import modules incl. selected Pester-version | ||
- name: Update Command Reference | ||
id: commands | ||
shell: pwsh | ||
run: | | ||
./generate-command-reference.ps1 -PesterVersion '${{ env.PESTER }}' -DocsVersion '${{ env.DOCS }}' | ||
|
||
# Output if any files were modified | ||
$updated = $null -ne (git status -s | Select-String '/commands/') | ||
"updated=$updated" >> $env:GITHUB_OUTPUT | ||
- name: Update PesterConfiguration docs | ||
if: ${{ env.DOCS != 'v4' }} | ||
id: config | ||
shell: pwsh | ||
run: | | ||
./generate-pesterconfiguration-docs.ps1 -PesterVersion '${{ env.PESTER }}' -Style Table -DocsVersion '${{ env.DOCS }}' | ||
|
||
# Output if any files were modified | ||
$updated = $null -ne (git status -s | Select-String '/usage/Configuration.mdx') | ||
"updated=$updated" >> $env:GITHUB_OUTPUT | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5 | ||
id: create-pr | ||
env: | ||
PR_BRANCH: "docs-update/${{ env.DOCS }}-v${{ env.PESTER }}" | ||
TITLE_DOCS_VERSION: "${{ env.DOCS != 'Current' && format('{0} ', env.DOCS) || '' }}" | ||
with: | ||
branch: ${{ env.PR_BRANCH }} | ||
branch-suffix: short-commit-hash | ||
draft: false | ||
# Should always be reviewed by author to fix typos or other errors | ||
reviewers: ${{ github.actor }} | ||
# Set user triggering the workflow as author (default in action) | ||
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com> | ||
# Github Action as commit (explicit default) | ||
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | ||
commit-message: "Update generated docs to ${{ env.PESTER }}" | ||
add-paths: | | ||
docs | ||
versioned_docs | ||
title: Update ${{ env.TITLE_DOCS_VERSION }}docs to Pester v${{ env.PESTER }} | ||
body: | | ||
Updates generated documentation using the specified Pester-version. | ||
|
||
**Docs version:** ${{ env.DOCS }} | ||
**Pester version:** ${{ env.PESTER }} | ||
|
||
| Documentation updated | Result | | ||
|-----------------------|--------| | ||
| Command Reference | ${{ steps.commands.outputs.updated }} | | ||
| PesterConfiguration section | ${{ steps.config.outputs.updated }} | | ||
|
||
*PR created using 'Update Pester Docs' workflow* | ||
|
||
- name: Output PR details | ||
if: ${{ steps.create-pr.outputs.pull-request-number }} | ||
run: | | ||
echo "### Update Pester Docs successfully completed! :rocket:" >> $GITHUB_STEP_SUMMARY | ||
echo "See [pull request #${{ steps.create-pr.outputs.pull-request-number }}](${{ steps.create-pr.outputs.pull-request-url }})" >> $GITHUB_STEP_SUMMARY |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
--- | ||
id: Get-EquivalencyOption | ||
title: Get-EquivalencyOption | ||
description: Help page for the PowerShell Pester "Get-EquivalencyOption" command | ||
keywords: | ||
- PowerShell | ||
- Pester | ||
- Help | ||
- Documentation | ||
hide_title: false | ||
hide_table_of_contents: false | ||
custom_edit_url: null | ||
--- | ||
|
||
:::info This page was generated | ||
Contributions are welcome in [Pester-repo](https://github.com/pester/pester). | ||
::: | ||
|
||
## SYNOPSIS | ||
|
||
Generates an object containing options for checking equivalency. | ||
|
||
## SYNTAX | ||
|
||
```powershell | ||
Get-EquivalencyOption [[-ExcludePath] <String[]>] [-ExcludePathsNotOnExpected] [[-Comparator] <String>] | ||
[<CommonParameters>] | ||
``` | ||
|
||
## DESCRIPTION | ||
|
||
The `Get-EquivalencyOption` function creates a custom object with options that determine how equivalency between two objects is assessed. | ||
This can be used in scenarios where a deep comparison of objects is required, with the ability to exclude specific paths from the comparison and to choose between different comparison strategies. | ||
|
||
## EXAMPLES | ||
|
||
### EXAMPLE 1 | ||
|
||
```powershell | ||
$option = Get-EquivalencyOption -ExcludePath 'Id', 'Timestamp' -Comparator 'Equality' | ||
This example generates an equivalency option object that excludes the 'Id' and 'Timestamp' properties from the comparison and uses a simple equality comparison strategy. | ||
``` | ||
|
||
### EXAMPLE 2 | ||
|
||
```powershell | ||
$option = Get-EquivalencyOption -ExcludePathsNotOnExpected | ||
This example generates an equivalency option object that excludes any paths not present on the expected object from the comparison, using the default deep comparison strategy. | ||
``` | ||
|
||
## PARAMETERS | ||
|
||
### -ExcludePath | ||
|
||
An array of strings specifying the paths to exclude from the comparison. | ||
Each path should correspond to a property name or a chain of property names separated by dots for nested properties. | ||
|
||
```yaml | ||
Type: String[] | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: False | ||
Position: 1 | ||
Default value: @() | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
|
||
### -ExcludePathsNotOnExpected | ||
|
||
A switch parameter that, when set, excludes any paths from the comparison that are not present on the expected object. | ||
This is useful for ignoring extra properties on the actual object that are not relevant to the comparison. | ||
|
||
```yaml | ||
Type: SwitchParameter | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: False | ||
Position: Named | ||
Default value: False | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
|
||
### -Comparator | ||
|
||
Specifies the comparison strategy to use. | ||
The options are 'Equivalency' for a deep comparison that considers the structure and values of objects, and 'Equality' for a simple equality comparison. | ||
The default is 'Equivalency'. | ||
|
||
```yaml | ||
Type: String | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: False | ||
Position: 2 | ||
Default value: Equivalency | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
|
||
### CommonParameters | ||
|
||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). | ||
|
||
## INPUTS | ||
|
||
## OUTPUTS | ||
|
||
## NOTES | ||
|
||
## RELATED LINKS | ||
|
||
[https://pester.dev/docs/commands/Get-EquivalencyOption](https://pester.dev/docs/commands/Get-EquivalencyOption) | ||
|
||
[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) | ||
|
||
## VERSION | ||
|
||
*This page was generated using comment-based help in [Pester 6.0.0-alpha1](https://github.com/pester/pester).* |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.