From 802b64912692082795940ea7182ca9072ff8ed27 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期五, 28 二月 2025 12:52:07 +0800
Subject: [PATCH] #优化 1. 波次管理排序优先级 2. 确认发货后,波次未删除
---
zy-asrs-flow/tests/setupTests.jsx | 128 +++++++++++++++++++++---------------------
1 files changed, 64 insertions(+), 64 deletions(-)
diff --git a/zy-asrs-flow/tests/setupTests.jsx b/zy-asrs-flow/tests/setupTests.jsx
index 952561d..4cfde3b 100644
--- a/zy-asrs-flow/tests/setupTests.jsx
+++ b/zy-asrs-flow/tests/setupTests.jsx
@@ -1,64 +1,64 @@
-锘縞onst localStorageMock = {
- getItem: jest.fn(),
- setItem: jest.fn(),
- removeItem: jest.fn(),
- clear: jest.fn(),
-};
-
-global.localStorage = localStorageMock;
-
-Object.defineProperty(URL, 'createObjectURL', {
- writable: true,
- value: jest.fn(),
-});
-
-class Worker {
- constructor(stringUrl) {
- this.url = stringUrl;
- this.onmessage = () => {};
- }
-
- postMessage(msg) {
- this.onmessage(msg);
- }
-}
-window.Worker = Worker;
-
-/* eslint-disable global-require */
-if (typeof window !== 'undefined') {
- // ref: https://github.com/ant-design/ant-design/issues/18774
- if (!window.matchMedia) {
- Object.defineProperty(global.window, 'matchMedia', {
- writable: true,
- configurable: true,
- value: jest.fn(() => ({
- matches: false,
- addListener: jest.fn(),
- removeListener: jest.fn(),
- })),
- });
- }
- if (!window.matchMedia) {
- Object.defineProperty(global.window, 'matchMedia', {
- writable: true,
- configurable: true,
- value: jest.fn((query) => ({
- matches: query.includes('max-width'),
- addListener: jest.fn(),
- removeListener: jest.fn(),
- })),
- });
- }
-}
-const errorLog = console.error;
-Object.defineProperty(global.window.console, 'error', {
- writable: true,
- configurable: true,
- value: (...rest) => {
- const logStr = rest.join('');
- if (logStr.includes('Warning: An update to %s inside a test was not wrapped in act(...)')) {
- return;
- }
- errorLog(...rest);
- },
-});
+锘縞onst localStorageMock = {
+ getItem: jest.fn(),
+ setItem: jest.fn(),
+ removeItem: jest.fn(),
+ clear: jest.fn(),
+};
+
+global.localStorage = localStorageMock;
+
+Object.defineProperty(URL, 'createObjectURL', {
+ writable: true,
+ value: jest.fn(),
+});
+
+class Worker {
+ constructor(stringUrl) {
+ this.url = stringUrl;
+ this.onmessage = () => {};
+ }
+
+ postMessage(msg) {
+ this.onmessage(msg);
+ }
+}
+window.Worker = Worker;
+
+/* eslint-disable global-require */
+if (typeof window !== 'undefined') {
+ // ref: https://github.com/ant-design/ant-design/issues/18774
+ if (!window.matchMedia) {
+ Object.defineProperty(global.window, 'matchMedia', {
+ writable: true,
+ configurable: true,
+ value: jest.fn(() => ({
+ matches: false,
+ addListener: jest.fn(),
+ removeListener: jest.fn(),
+ })),
+ });
+ }
+ if (!window.matchMedia) {
+ Object.defineProperty(global.window, 'matchMedia', {
+ writable: true,
+ configurable: true,
+ value: jest.fn((query) => ({
+ matches: query.includes('max-width'),
+ addListener: jest.fn(),
+ removeListener: jest.fn(),
+ })),
+ });
+ }
+}
+const errorLog = console.error;
+Object.defineProperty(global.window.console, 'error', {
+ writable: true,
+ configurable: true,
+ value: (...rest) => {
+ const logStr = rest.join('');
+ if (logStr.includes('Warning: An update to %s inside a test was not wrapped in act(...)')) {
+ return;
+ }
+ errorLog(...rest);
+ },
+});
--
Gitblit v1.9.1