@cedarjs/testing 4.0.0-canary.13779 → 4.0.0-canary.13781
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -46,7 +46,7 @@ const mockContext = new Proxy(
|
|
|
46
46
|
global.mockCurrentUser = (currentUser) => {
|
|
47
47
|
mockContextStore.set("context", { currentUser });
|
|
48
48
|
};
|
|
49
|
-
const
|
|
49
|
+
const HANDLED_ERRORS = [1451, 1811, 23001, 23503];
|
|
50
50
|
const TEARDOWN_CACHE_PATH = tearDownCachePath;
|
|
51
51
|
const DEFAULT_SCENARIO = "standard";
|
|
52
52
|
let teardownOrder = [];
|
|
@@ -165,7 +165,7 @@ const teardown = async () => {
|
|
|
165
165
|
} catch (e) {
|
|
166
166
|
const message = isErrorWithMessage(e) ? e.message : "";
|
|
167
167
|
const match = message.match(/Code: `(\d+)`/);
|
|
168
|
-
if (match &&
|
|
168
|
+
if (match && HANDLED_ERRORS.includes(parseInt(match[1]))) {
|
|
169
169
|
teardownOrder.splice(i, 1);
|
|
170
170
|
teardownOrder.push(modelName);
|
|
171
171
|
i--;
|
|
@@ -38,7 +38,7 @@ globalThis.mockCurrentUser = (currentUser) => {
|
|
|
38
38
|
};
|
|
39
39
|
globalThis.defineScenario = defineScenario;
|
|
40
40
|
const cedarPaths = getPaths();
|
|
41
|
-
const
|
|
41
|
+
const HANDLED_ERRORS = [1451, 1811, 23001, 23503];
|
|
42
42
|
const TEARDOWN_CACHE_PATH = path.join(
|
|
43
43
|
cedarPaths.generated.base,
|
|
44
44
|
"scenarioTeardown.json"
|
|
@@ -139,7 +139,7 @@ async function teardown() {
|
|
|
139
139
|
} catch (e) {
|
|
140
140
|
console.error("teardown error\n", e);
|
|
141
141
|
const match = isErrorWithMessage(e) && e.message.match(/Code: `(\d+)`/);
|
|
142
|
-
if (match &&
|
|
142
|
+
if (match && HANDLED_ERRORS.includes(parseInt(match[1]))) {
|
|
143
143
|
const index = teardownOrder.indexOf(modelName);
|
|
144
144
|
teardownOrder[index] = null;
|
|
145
145
|
teardownOrder.push(modelName);
|
|
@@ -61,7 +61,7 @@ globalThis.mockCurrentUser = (currentUser) => {
|
|
|
61
61
|
};
|
|
62
62
|
globalThis.defineScenario = import_api.defineScenario;
|
|
63
63
|
const cedarPaths = (0, import_project_config.getPaths)();
|
|
64
|
-
const
|
|
64
|
+
const HANDLED_ERRORS = [1451, 1811, 23001, 23503];
|
|
65
65
|
const TEARDOWN_CACHE_PATH = import_node_path.default.join(
|
|
66
66
|
cedarPaths.generated.base,
|
|
67
67
|
"scenarioTeardown.json"
|
|
@@ -162,7 +162,7 @@ async function teardown() {
|
|
|
162
162
|
} catch (e) {
|
|
163
163
|
console.error("teardown error\n", e);
|
|
164
164
|
const match = isErrorWithMessage(e) && e.message.match(/Code: `(\d+)`/);
|
|
165
|
-
if (match &&
|
|
165
|
+
if (match && HANDLED_ERRORS.includes(parseInt(match[1]))) {
|
|
166
166
|
const index = teardownOrder.indexOf(modelName);
|
|
167
167
|
teardownOrder[index] = null;
|
|
168
168
|
teardownOrder.push(modelName);
|
|
@@ -46,7 +46,7 @@ const mockContext = new Proxy(
|
|
|
46
46
|
global.mockCurrentUser = (currentUser) => {
|
|
47
47
|
mockContextStore.set("context", { currentUser });
|
|
48
48
|
};
|
|
49
|
-
const
|
|
49
|
+
const HANDLED_ERRORS = [1451, 1811, 23001, 23503];
|
|
50
50
|
const TEARDOWN_CACHE_PATH = tearDownCachePath;
|
|
51
51
|
const DEFAULT_SCENARIO = "standard";
|
|
52
52
|
let teardownOrder = [];
|
|
@@ -165,7 +165,7 @@ const teardown = async () => {
|
|
|
165
165
|
} catch (e) {
|
|
166
166
|
const message = isErrorWithMessage(e) ? e.message : "";
|
|
167
167
|
const match = message.match(/Code: `(\d+)`/);
|
|
168
|
-
if (match &&
|
|
168
|
+
if (match && HANDLED_ERRORS.includes(parseInt(match[1]))) {
|
|
169
169
|
teardownOrder.splice(i, 1);
|
|
170
170
|
teardownOrder.push(modelName);
|
|
171
171
|
i--;
|
|
@@ -23,7 +23,7 @@ const mockContext = new Proxy(
|
|
|
23
23
|
global.mockCurrentUser = (currentUser) => {
|
|
24
24
|
mockContextStore.set("context", { currentUser });
|
|
25
25
|
};
|
|
26
|
-
const
|
|
26
|
+
const HANDLED_ERRORS = [1451, 1811, 23001, 23503];
|
|
27
27
|
const TEARDOWN_CACHE_PATH = tearDownCachePath;
|
|
28
28
|
const DEFAULT_SCENARIO = "standard";
|
|
29
29
|
let teardownOrder = [];
|
|
@@ -142,7 +142,7 @@ const teardown = async () => {
|
|
|
142
142
|
} catch (e) {
|
|
143
143
|
const message = isErrorWithMessage(e) ? e.message : "";
|
|
144
144
|
const match = message.match(/Code: `(\d+)`/);
|
|
145
|
-
if (match &&
|
|
145
|
+
if (match && HANDLED_ERRORS.includes(parseInt(match[1]))) {
|
|
146
146
|
teardownOrder.splice(i, 1);
|
|
147
147
|
teardownOrder.push(modelName);
|
|
148
148
|
i--;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/testing",
|
|
3
|
-
"version": "4.0.0-canary.
|
|
3
|
+
"version": "4.0.0-canary.13781+ef38e3e5bf",
|
|
4
4
|
"description": "Tools, wrappers and configuration for testing a Cedar project.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -119,13 +119,13 @@
|
|
|
119
119
|
"test:watch": "vitest watch"
|
|
120
120
|
},
|
|
121
121
|
"dependencies": {
|
|
122
|
-
"@cedarjs/auth": "4.0.0-canary.
|
|
123
|
-
"@cedarjs/babel-config": "4.0.0-canary.
|
|
124
|
-
"@cedarjs/context": "4.0.0-canary.
|
|
125
|
-
"@cedarjs/graphql-server": "4.0.0-canary.
|
|
126
|
-
"@cedarjs/project-config": "4.0.0-canary.
|
|
127
|
-
"@cedarjs/router": "4.0.0-canary.
|
|
128
|
-
"@cedarjs/web": "4.0.0-canary.
|
|
122
|
+
"@cedarjs/auth": "4.0.0-canary.13781",
|
|
123
|
+
"@cedarjs/babel-config": "4.0.0-canary.13781",
|
|
124
|
+
"@cedarjs/context": "4.0.0-canary.13781",
|
|
125
|
+
"@cedarjs/graphql-server": "4.0.0-canary.13781",
|
|
126
|
+
"@cedarjs/project-config": "4.0.0-canary.13781",
|
|
127
|
+
"@cedarjs/router": "4.0.0-canary.13781",
|
|
128
|
+
"@cedarjs/web": "4.0.0-canary.13781",
|
|
129
129
|
"@testing-library/jest-dom": "6.9.1",
|
|
130
130
|
"@testing-library/react": "14.3.1",
|
|
131
131
|
"@testing-library/user-event": "14.6.1",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"whatwg-fetch": "3.6.20"
|
|
146
146
|
},
|
|
147
147
|
"devDependencies": {
|
|
148
|
-
"@cedarjs/framework-tools": "4.0.0-canary.
|
|
148
|
+
"@cedarjs/framework-tools": "4.0.0-canary.13781",
|
|
149
149
|
"concurrently": "9.2.1",
|
|
150
150
|
"jsdom": "27.4.0",
|
|
151
151
|
"publint": "0.3.18",
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
"publishConfig": {
|
|
168
168
|
"access": "public"
|
|
169
169
|
},
|
|
170
|
-
"gitHead": "
|
|
170
|
+
"gitHead": "ef38e3e5bfe2db2f78a3faa0df19b725cfd2c9f4",
|
|
171
171
|
"nx": {
|
|
172
172
|
"targets": {
|
|
173
173
|
"build": {
|