Skip to content

Refactor Web Cmdltes Tests #5669

@markekraus

Description

@markekraus

I thought I had an open issue for this already, but I do not.

The Web cmdlets tests need attention. During the course of moving tests to WebListener, quite a few redundant, unnecessary, broken, or unclear tests were found. Each test needs to be verified that it is still relevant, works properly (isn't checking $null -eq $null), and is sufficiently testing what it claims to test. Additionally, there are several foreach loops and we should look at refactoring those to -TestCases. Also, several tests are labeled pending or skipped by logic which may be horrible to test, so each skip/pending/logic gate needs to be evaluated for accuracy.

Finally, The tests need to be cleaned up. I'm recommending the tests be standardized on OTBS or Stoustrup so they can blend in better with Pester. Switching between pester's OTBS/Stroustrup requirement and Allman for logic is ugly and makes the code hard to read and raises the bar for community contributions (having to code to multiple styles at once).

Some of the functions helper functions are redundant and might be suited better as in a module to make it easier to test a la carte.

region's should also become context's

Fix BeExactly -> Be for integers

Metadata

Metadata

Assignees

Labels

Resolution-No ActivityIssue has had no activity for 6 months or more

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions