Skip to content

Commit cc2eb8b

Browse files
committed
chore: fixing PR issues Refs: KEH-281
1 parent 6b4178c commit cc2eb8b

7 files changed

Lines changed: 14 additions & 21 deletions

File tree

.storybook/main.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ module.exports = {
66

77
webpackFinal: async (config) => {
88
config.resolve.fallback.crypto = require.resolve('crypto-browserify');
9+
config.plugins ??= [];
910
config.plugins.push(
10-
new webpack.DefinePlugin({
11-
'process.env': JSON.stringify(process.env),
11+
new webpack.EnvironmentPlugin({
12+
CMS_GRAPHQL_ENDPOINT: null,
13+
EVENTS_GRAPHQL_ENDPOINT: null,
14+
LINKED_EVENTS_ENDPOINT: null,
1215
}),
1316
);
1417
return config;

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@
139139
"graphql": "^16.12.0",
140140
"hds-react": "4.8.1",
141141
"husky": "^9.1.7",
142-
"identity-obj-proxy": "^3.0.0",
143142
"jsdom": "^29.0.2",
144143
"lint-staged": "^16.2.7",
145144
"msw-storybook-addon": "^2.0.6",

src/core/image/__tests__/BackgroundImage.test.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,13 @@ beforeEach(() => {
4949
window.Image = function () {
5050
return mockImage;
5151
};
52+
// globalThis.Image is what `new Image()` resolves to in production code
53+
globalThis.Image = window.Image;
5254
});
5355

5456
afterEach(() => {
5557
window.Image = originalImage;
58+
globalThis.Image = originalImage;
5659
});
5760

5861
test('renders BackgroundImage url without accessiblity violations', async () => {

src/core/image/__tests__/Image.test.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,13 @@ beforeEach(() => {
4949
window.Image = function () {
5050
return mockImage;
5151
};
52+
// globalThis.Image is what `new Image()` resolves to in production code
53+
globalThis.Image = window.Image;
5254
});
5355

5456
afterEach(() => {
5557
window.Image = originalImage;
58+
globalThis.Image = originalImage;
5659
});
5760

5861
test('renders image src without accessiblity violations', async () => {

src/core/pageSection/__tests__/PageSection.test.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,13 @@ beforeEach(() => {
4949
window.Image = function () {
5050
return mockImage;
5151
};
52+
// globalThis.Image is what `new Image()` resolves to in production code
53+
globalThis.Image = window.Image;
5254
});
5355

5456
afterEach(() => {
5557
window.Image = originalImage;
58+
globalThis.Image = originalImage;
5659
});
5760

5861
test('renders image url without accessiblity violations', async () => {

vitest.config.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ export default defineConfig({
77
globals: true,
88
environment: 'jsdom',
99
setupFiles: ['./vitest-setup.ts'],
10-
alias: [
11-
{
12-
find: '\\.(css|less|scss|sss|styl)$',
13-
replacement: 'identity-obj-proxy',
14-
},
15-
],
1610
css: {
1711
modules: {
1812
classNameStrategy: 'non-scoped',

yarn.lock

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7787,11 +7787,6 @@ graphql@^16.12.0, graphql@^16.8.1:
77877787
resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.12.0.tgz#28cc2462435b1ac3fdc6976d030cef83a0c13ac7"
77887788
integrity sha512-DKKrynuQRne0PNpEbzuEdHlYOMksHSUI8Zc9Unei5gTsMNA2/vMpoMz/yKba50pejK56qj98qM0SjYxAKi13gQ==
77897789

7790-
harmony-reflect@^1.4.6:
7791-
version "1.6.2"
7792-
resolved "https://registry.yarnpkg.com/harmony-reflect/-/harmony-reflect-1.6.2.tgz#31ecbd32e648a34d030d86adb67d4d47547fe710"
7793-
integrity sha512-HIp/n38R9kQjDEziXyDTuW3vvoxxyxjxFzXLrBr18uB47GnSt+G9D29fqrpM5ZkspMcPICud3XsBJQ4Y2URg8g==
7794-
77957790
has-bigints@^1.0.2:
77967791
version "1.1.0"
77977792
resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.1.0.tgz#28607e965ac967e03cd2a2c70a2636a1edad49fe"
@@ -8117,13 +8112,6 @@ icss-utils@^5.0.0, icss-utils@^5.1.0:
81178112
resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae"
81188113
integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==
81198114

8120-
identity-obj-proxy@^3.0.0:
8121-
version "3.0.0"
8122-
resolved "https://registry.yarnpkg.com/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz#94d2bda96084453ef36fbc5aaec37e0f79f1fc14"
8123-
integrity sha512-00n6YnVHKrinT9t0d9+5yZC6UBNJANpYEQvL2LlX6Ab9lnmxzIRcEmTPuyGScvl1+jKuCICX1Z0Ab1pPKKdikA==
8124-
dependencies:
8125-
harmony-reflect "^1.4.6"
8126-
81278115
ignore@^5.1.1, ignore@^5.2.0:
81288116
version "5.3.2"
81298117
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5"

0 commit comments

Comments
 (0)