Skip to content

Instantly share code, notes, and snippets.

@Fishy78
Fishy78 / Compare-Hashtable.Tests.ps1
Last active April 14, 2020 20:58 — forked from dbroeglin/Compare-Hashtable.Tests.ps1
A simple Compare-Hashtable function for powershell
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.'
. "$here\$sut"
Describe "Compare-Hashtable" {
Context "When both are empty" {
$Left, $Right = @{}, @{}
It "should return nothing" {
Compare-Hashtable $Left $Right | Should BeNullOrEmpty