diff --git a/libs/common/spec/matchers/to-contain-partial-objects.ts b/libs/common/spec/matchers/to-contain-partial-objects.ts index f072ca6fba6..dfe635b734c 100644 --- a/libs/common/spec/matchers/to-contain-partial-objects.ts +++ b/libs/common/spec/matchers/to-contain-partial-objects.ts @@ -1,5 +1,3 @@ -import { EOL } from "os"; - import { diff } from "jest-diff"; export const toContainPartialObjects: jest.CustomMatcher = function ( @@ -15,7 +13,7 @@ export const toContainPartialObjects: jest.CustomMatcher = function ( return { message: () => "Expected the received array NOT to include partial matches for all expected objects." + - EOL + + "\n" + diff(expected, received), pass: true, }; @@ -24,7 +22,7 @@ export const toContainPartialObjects: jest.CustomMatcher = function ( return { message: () => "Expected the received array to contain partial matches for all expected objects." + - EOL + + "\n" + diff(expected, received), pass: false, };