Skip to content

Commit 88d73a2

Browse files
committed
Align tests
1 parent 9d31fa7 commit 88d73a2

10 files changed

Lines changed: 3696 additions & 4390 deletions

File tree

package-lock.json

Lines changed: 3652 additions & 4326 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,57 +5,52 @@
55
"license": "Apache-2.0",
66
"author": "Comwrap Reply GmbH",
77
"dependencies": {
8-
"@adobe/aio-lib-ims": "^7.0.1",
9-
"@adobe/aio-lib-files": "^4.1.0",
8+
"@adobe/aio-lib-files": "^4.1.2",
109
"@adobe/aio-lib-state": "^5.1.0",
11-
"@adobe/commerce-sdk-auth": "^0.1.0",
1210
"@adobe/aio-sdk": "^6.0.0",
13-
"@adobe/exc-app": "^1.4.9",
14-
"@adobe/react-spectrum": "^3.25.1",
15-
"@adobe/uix-guest": "^1.0.1",
11+
"@adobe/commerce-sdk-auth": "^0.1.0",
12+
"@adobe/exc-app": "^1.4.17",
13+
"@adobe/react-spectrum": "^3.43.0",
14+
"@adobe/uix-guest": "^1.0.3",
1615
"@codemirror/autocomplete": "^6.18.6",
17-
"@codemirror/lang-javascript": "^6.2.3",
16+
"@codemirror/lang-javascript": "^6.2.4",
1817
"@codemirror/lang-xml": "^6.1.0",
1918
"@codemirror/state": "^6.5.2",
20-
"@codemirror/view": "^6.36.3",
21-
"@react-spectrum/table": "^3.15.1",
22-
"@react-spectrum/toast": "^3.0.0-alpha.1",
19+
"@codemirror/view": "^6.38.1",
20+
"@react-spectrum/table": "^3.17.4",
21+
"@react-spectrum/toast": "^3.1.0",
2322
"@spectrum-icons/workflow": "^4.2.2",
24-
"bwip-js": "^4.5.1",
25-
"cloudevents": "^8.0.2",
26-
"codemirror": "^6.0.1",
23+
"cloudevents": "^10.0.0",
24+
"codemirror": "^6.0.2",
2725
"date-fns": "^4.1.0",
28-
"fast-xml-parser": "^5.0.3",
29-
"graphql": "^16.10.0",
26+
"fast-xml-parser": "^5.2.5",
27+
"got": "^11.8.6",
28+
"graphql": "^16.11.0",
3029
"json-to-graphql-query": "^2.2.5",
3130
"moment": "^2.29.4",
3231
"node-fetch": "^3.3.2",
3332
"prop-types": "^15.8.1",
34-
"react": "^19.0.0",
35-
"react-dom": "^19.0.0",
36-
"react-error-boundary": "^5.0.0",
37-
"react-stately": "^3.21.0",
33+
"react": "^19.1.1",
34+
"react-dom": "^19.1.1",
3835
"react-zlib-js": "^1.0.5",
39-
"regenerator-runtime": "^0.14.1",
40-
"uuid": "^11.1.0",
41-
"got": "^11.8.5"
36+
"uuid": "^11.1.0"
4237
},
4338
"devDependencies": {
4439
"@adobe/eslint-config-aio-lib-config": "^4.0.0",
45-
"@babel/core": "^7.24.7",
40+
"@babel/core": "^7.28.3",
4641
"@babel/plugin-transform-react-jsx": "^7.24.7",
4742
"@babel/polyfill": "^7.8.7",
48-
"@babel/preset-env": "^7.24.7",
43+
"@babel/preset-env": "^7.28.3",
4944
"@babel/preset-react": "^7.24.7",
5045
"@babel/preset-typescript": "^7.24.7",
5146
"@tsconfig/node20": "^20.1.4",
5247
"concurrently": "^9.1.0",
53-
"follow-redirects": ">=1.15.6",
54-
"jest": "^29.7.0",
55-
"nock": "^13.5.6",
56-
"rimraf": "^6.0.1",
48+
"follow-redirects": "^1.15.11",
49+
"jest": "^30.0.5",
50+
"nock": "^14.0.10",
5751
"stdout-stderr": "^0.1.13",
58-
"typescript": "^5.7.2"
52+
"typescript": "^5.9.2",
53+
"bwip-js": "^4.7.0"
5954
},
6055
"scripts": {
6156
"test": "jest --passWithNoTests ./test",

packages/commerce-sdk-auth/tsconfig.cjs.tsbuildinfo

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

packages/commerce-sdk-auth/tsconfig.es.tsbuildinfo

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

packages/commerce-sdk-auth/tsconfig.types.tsbuildinfo

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/commerce-backend-ui-1/actions/acGqlLib/schema.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
const {getIntrospectionQuery} = require("graphql");
22
const {errorResponse} = require("./../utils.js");
33
const { Core } = require('@adobe/aio-sdk');
4-
const { log } = require("react-zlib-js");
54

65
/**
76
* Return GQL schema or throw error

src/commerce-backend-ui-1/actions/getConfig/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ async function main (params) {
1111

1212
try {
1313

14-
responseData = {};
14+
let responseData = {};
1515
responseData.ims = false
1616
if (authParams.ims !== undefined && authParams.ims !== null) {
1717
responseData.ims = true

src/commerce-backend-ui-1/actions/meshGql.js

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,21 @@ async function callMeshGql(gqlRequest, params, variables = {}) {
1919
})
2020
}
2121

22-
try {
23-
const response = await fetch(gqlUrl, requestBody);
24-
25-
if (!response.ok) {
26-
const errorText = await response.text();
27-
throw new Error(`HTTP error! status: ${response.status} ${response.statusText}, body: ${errorText}`);
28-
}
29-
30-
const result = await response.json();
31-
32-
if (result.errors) {
33-
throw new Error(`failed request to Mesh API. Status: ${response.status} and message: ${JSON.stringify(result.errors)}`)
34-
}
35-
36-
return result;
37-
38-
} catch (error) {
39-
throw error;
22+
const response = await fetch(gqlUrl, requestBody);
23+
24+
if (!response.ok) {
25+
const errorText = await response.text();
26+
throw new Error(`HTTP error! status: ${response.status} ${response.statusText}, body: ${errorText}`);
27+
}
28+
29+
const result = await response.json();
30+
31+
if (result.errors) {
32+
throw new Error(`failed request to Mesh API. Status: ${response.status} and message: ${JSON.stringify(result.errors)}`)
4033
}
34+
35+
return result;
36+
4137
}
4238

4339
module.exports = {

test/actions/utils/generation/processVariables.test.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const { Core } = require('@adobe/aio-sdk');
2-
const bwipjs = require('bwip-js');
3-
const { processVariables } = require('./../../../../actions/utils/generation/processVariables.js');
2+
const { processVariables } = require('./../../../../src/commerce-backend-ui-1/actions/utils/generation/processVariables.js');
43

54
jest.mock('@adobe/aio-sdk', () => ({
65
Core: {
@@ -24,10 +23,6 @@ beforeEach(() => {
2423
mockLoggerInstance.error.mockReset();
2524
});
2625

27-
const params = {
28-
value: 'test'
29-
};
30-
3126
describe('processVariables', () => {
3227

3328
test('handlePlaceholder should be defined', () => {

test/actions/utils/placeholderHandler.test.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const { Core } = require('@adobe/aio-sdk');
2-
const bwipjs = require('bwip-js');
3-
const { handlePlaceholder, wrapInCDATAIfNeeded } = require('./../../../actions/utils/placeholderHandler.js');
2+
const { handlePlaceholder, wrapInCDATAIfNeeded } = require('./../../../src/commerce-backend-ui-1/actions/utils/placeholderHandler.js');
43

54
jest.mock('@adobe/aio-sdk', () => ({
65
Core: {
@@ -24,10 +23,6 @@ beforeEach(() => {
2423
mockLoggerInstance.error.mockReset();
2524
});
2625

27-
const params = {
28-
value: 'test'
29-
};
30-
3126
describe('placeholderHandler', () => {
3227

3328
test('handlePlaceholder should be defined', () => {

0 commit comments

Comments
 (0)