1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-21 02:33:46 +00:00

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 669f6557b6.
This commit is contained in:
Todd Martin
2025-12-10 16:38:10 -05:00
parent 669f6557b6
commit 25603842fe

View File

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