From 25603842fea752f1ce8989c4a95c234ff083852b Mon Sep 17 00:00:00 2001 From: Todd Martin Date: Wed, 10 Dec 2025 16:38:10 -0500 Subject: [PATCH] Revert "Removed dependency on os. This is necessary so that the @bitwarden/common/spec lib package can be referenced in tests without node." This reverts commit 669f6557b6561f65ff513c14c2b3e8a55bef4035. --- libs/common/spec/matchers/to-contain-partial-objects.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/common/spec/matchers/to-contain-partial-objects.ts b/libs/common/spec/matchers/to-contain-partial-objects.ts index dfe635b734c..f072ca6fba6 100644 --- a/libs/common/spec/matchers/to-contain-partial-objects.ts +++ b/libs/common/spec/matchers/to-contain-partial-objects.ts @@ -1,3 +1,5 @@ +import { EOL } from "os"; + import { diff } from "jest-diff"; export const toContainPartialObjects: jest.CustomMatcher = function ( @@ -13,7 +15,7 @@ export const toContainPartialObjects: jest.CustomMatcher = function ( return { message: () => "Expected the received array NOT to include partial matches for all expected objects." + - "\n" + + EOL + diff(expected, received), pass: true, }; @@ -22,7 +24,7 @@ export const toContainPartialObjects: jest.CustomMatcher = function ( return { message: () => "Expected the received array to contain partial matches for all expected objects." + - "\n" + + EOL + diff(expected, received), pass: false, };