Describe and It
noun
say it: “dih-SKRYBE and IT” /dɪˈskraɪb ənd ˈɪt/
The two kinds of blocks in a Pester test file: one groups the tests for a command, the other is a single test named as a sentence.
What are Describe and It in Pester?
In a Pester test file, Describe is a folder of tests for one command, and each It inside it is one test, named as a sentence about what the command should do. The report reads like a checklist of those sentences.
Describe 'Get-Song' {
It 'turns 3:45 into 225 seconds' {
(Get-Song -Path $csv)[0].Seconds | Should -Be 225
}
}
In a sentence
- “Sam wrote Describe and It blocks for Get-Song: one Describe, three Its.”
- “Pester's report reads like a checklist because of Describe and It.”
Level: Freelancer · More PowerShell terms at this level
Updated