diff --git a/code/.yarn/patches/@vitest-expect-npm-1.6.0-0e382f8212.patch b/code/.yarn/patches/@vitest-expect-npm-1.6.0-0e382f8212.patch deleted file mode 100644 index 04c3bd5cfd7..00000000000 --- a/code/.yarn/patches/@vitest-expect-npm-1.6.0-0e382f8212.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff --git a/dist/index.js b/dist/index.js -index 13af149aa3c44f52dd5c5a80db3bf5689dfe15ea..1d111032c3fdc104723e19dea49db62be8b79b94 100644 ---- a/dist/index.js -+++ b/dist/index.js -@@ -6,26 +6,32 @@ import { processError } from '@vitest/utils/error'; - import { util } from 'chai'; - - const MATCHERS_OBJECT = Symbol.for("matchers-object"); --const JEST_MATCHERS_OBJECT = Symbol.for("$$jest-matchers-object"); -+// Patched this symbol for storybook, so that @storybook/test can be used in a jest environment as well. -+// Otherwise, vitest will override global jest matchers, and crash. -+const JEST_MATCHERS_OBJECT = Symbol.for("$$jest-matchers-object-storybook"); - const GLOBAL_EXPECT = Symbol.for("expect-global"); - const ASYMMETRIC_MATCHERS_OBJECT = Symbol.for("asymmetric-matchers-object"); - - if (!Object.prototype.hasOwnProperty.call(globalThis, MATCHERS_OBJECT)) { - const globalState = /* @__PURE__ */ new WeakMap(); -- const matchers = /* @__PURE__ */ Object.create(null); -- const customEqualityTesters = []; -- const assymetricMatchers = /* @__PURE__ */ Object.create(null); - Object.defineProperty(globalThis, MATCHERS_OBJECT, { - get: () => globalState - }); -+} -+if (!Object.prototype.hasOwnProperty.call(globalThis, JEST_MATCHERS_OBJECT)) { -+ const matchers = /* @__PURE__ */ Object.create(null); -+ const customEqualityTesters = []; - Object.defineProperty(globalThis, JEST_MATCHERS_OBJECT, { - configurable: true, - get: () => ({ -- state: globalState.get(globalThis[GLOBAL_EXPECT]), -+ state: globalThis[MATCHERS_OBJECT].get(globalThis[GLOBAL_EXPECT]), - matchers, - customEqualityTesters - }) - }); -+} -+if (!Object.prototype.hasOwnProperty.call(globalThis, ASYMMETRIC_MATCHERS_OBJECT)) { -+ const assymetricMatchers = /* @__PURE__ */ Object.create(null); - Object.defineProperty(globalThis, ASYMMETRIC_MATCHERS_OBJECT, { - get: () => assymetricMatchers - });