Add Assert assertions to Pester
Fix #1423
PR Summary
This PR adds assertions from Assert module to Pester, to serve as a base for future assertions and to live side-by-side with the existing Should assertions that are based on parameter sets.
PR Checklist
- [x] PR has meaningful title
- [x] Summary describes changes
- [ ] PR is ready to be merged
- If not, use the arrow next to
Create Pull Requestto mark it as a draft. PR can be markedReady for reviewwhen it's ready.
- If not, use the arrow next to
- [x] Tests are added/update (if required)
- [ ] Documentation is updated/added (if required)
We should probably decide on #2381 soon, so these assertions can either implement it - or not. 🙂
/azp run
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.
This PR is getting too much, will start refactoring the existing assertions towards common pattern (to make them more similar to the current Should -* assertions), instead of adding new ones.
- [x] rename all files to Should-*
- [x] rename all test files to should-*, and use Should-Assertions in the tests instead of Assert- to make sure we export them. Get rid of inpestermodulescope
- [x] review messages so they look similar to existing assertions
- [x] write help
- [x] make type specific assertions require that type (e.g. should-*string needs string input)
- [ ] Fix assertion for collections - will do later
- [x] Make sure that assertions throw for no input?
Should be good enough to release in 6.0.0-alpha1 so we can get other people to look at this. Please give at another quick review @fflaten .
With 7k linediff I can't promise "quick", but I'll try tomorrow when my browser is done rendering the diff. 🙂 I'll trust your tests for functionality.
I've fixed all the suggestions, and what I did not fix I moved to issues :) Pls approve.