Skip to content
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

ConvertFrom-Expression: convert function/cmdlet calls as Objects #85

Open
iRon7 opened this issue Jun 10, 2024 · 0 comments
Open

ConvertFrom-Expression: convert function/cmdlet calls as Objects #85

iRon7 opened this issue Jun 10, 2024 · 0 comments
Assignees
Labels
cmdlet Cmdlet related enhancement New feature or request

Comments

@iRon7
Copy link
Owner

iRon7 commented Jun 10, 2024

An expression as e.g. a Pester script:

Describe 'Description' {
    Context 'Context info' {
        it 'Test' {
            2 | Should -be 3
        }
    }
}

Might be converted to an object like:

@{
    Describe = @{
        Name = 'Description'
        ScriptBlock = @{
            Context ' = @{
                Name = 'Context info'
                ScriptBlock = {
                    it = @{
                        Name = 'Test'
                        ScriptBlock = @{
                            Should = @{
                                ActualValue =2
                                Be = 3
                            }
                        }
                    }
                }
            }
        }
    }
}
@iRon7 iRon7 self-assigned this Jul 17, 2024
@iRon7 iRon7 added enhancement New feature or request cmdlet Cmdlet related labels Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmdlet Cmdlet related enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant