Skip to content

Commit

Permalink
feat: Out-JSON ( Fixes #727 )
Browse files Browse the repository at this point in the history
    Adding Example
  • Loading branch information
StartAutomating authored and StartAutomating committed Mar 9, 2024
1 parent 6737829 commit a3a74a3
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Tests/Examples/Template.PipeScript.Inherit.examples.tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

describe 'Template.PipeScript.Inherit' {
it 'Template.PipeScript.Inherit Example 1' {
Invoke-PipeScript {
[inherit("Get-Command")]
param()
}
}
it 'Template.PipeScript.Inherit Example 2' {
{
[inherit("gh",Overload)]
param()
begin { "ABOUT TO CALL GH"}
end { "JUST CALLED GH" }
}.Transpile()
}
it 'Template.PipeScript.Inherit Example 3' {
# Inherit Get-Transpiler abstractly and make it output the parameters passed in.
{
[inherit("Get-Transpiler", Abstract)]
param() process { $psBoundParameters }
}.Transpile()
}
it 'Template.PipeScript.Inherit Example 4' {
{
[inherit("Get-Transpiler", Dynamic, Abstract)]
param()
} | .>PipeScript
}
}

0 comments on commit a3a74a3

Please sign in to comment.