Skip to content

Commit 1f2f712

Browse files
committed
refactor: add comments to hidden console messages in vitest config
HCRC-178
1 parent 6f2d570 commit 1f2f712

4 files changed

Lines changed: 8 additions & 0 deletions

File tree

apps/events-helsinki/vitest-setup.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,11 @@ hideConsoleMessages({
113113
// Related issue:
114114
// https://github.com/facebook/react/issues/29233
115115
/Support for defaultProps will be removed.*Use JavaScript default parameters instead.*hds-react/s,
116+
// CSS stylesheets are not ever parsed by JSDOM, so the message is useless.
116117
/Could not parse CSS stylesheet/,
117118
],
118119
warn: [
120+
// Apollo deprecation message is spammed in tests, just for future info. It's not useful in unit tests.
119121
/`canonizeResults` is deprecated and will be removed in Apollo Client 4.0. Please remove this option./,
120122
],
121123
});

apps/hobbies-helsinki/vitest-setup.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,11 @@ hideConsoleMessages({
113113
// Related issue:
114114
// https://github.com/facebook/react/issues/29233
115115
/Support for defaultProps will be removed.*Use JavaScript default parameters instead.*hds-react/s,
116+
// CSS stylesheets are not ever parsed by JSDOM, so the message is useless.
116117
/Could not parse CSS stylesheet/,
117118
],
118119
warn: [
120+
// Apollo deprecation message is spammed in tests, just for future info. It's not useful in unit tests.
119121
/`canonizeResults` is deprecated and will be removed in Apollo Client 4.0. Please remove this option./,
120122
],
121123
});

apps/sports-helsinki/vitest-setup.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,11 @@ hideConsoleMessages({
112112
// Related issue:
113113
// https://github.com/facebook/react/issues/29233
114114
/Support for defaultProps will be removed.*Use JavaScript default parameters instead.*hds-react/s,
115+
// CSS stylesheets are not ever parsed by JSDOM, so the message is useless.
115116
/Could not parse CSS stylesheet/,
116117
],
117118
warn: [
119+
// Apollo deprecation message is spammed in tests, just for future info. It's not useful in unit tests.
118120
/`canonizeResults` is deprecated and will be removed in Apollo Client 4.0. Please remove this option./,
119121
],
120122
});

packages/components/vitest-setup.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,11 @@ hideConsoleMessages({
114114
// Related issue:
115115
// https://github.com/facebook/react/issues/29233
116116
/Support for defaultProps will be removed.*Use JavaScript default parameters instead.*hds-react/s,
117+
// CSS stylesheets are not ever parsed by JSDOM, so the message is useless.
117118
/Could not parse CSS stylesheet/,
118119
],
119120
warn: [
121+
// Apollo deprecation message is spammed in tests, just for future info. It's not useful in unit tests.
120122
/`canonizeResults` is deprecated and will be removed in Apollo Client 4.0. Please remove this option./,
121123
],
122124
});

0 commit comments

Comments
 (0)