Skip to content

Commit 2eaa7a2

Browse files
grimenclaude
andauthored
fix(test): suppress InteractionManager deprecation warning in CI logs (#3816)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d14cd1a commit 2eaa7a2

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

ci/pipeline.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ jobs:
8686
- name: repo
8787
run:
8888
path: pipeline-tasks/ci/tasks/test-unit.sh
89+
params:
90+
CI: true
8991

9092
- name: check-code
9193
plan:

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
"./node_modules/@react-native/jest-preset/jest/setup.js",
55
"./node_modules/react-native-gesture-handler/jestSetup.js",
66
],
7-
setupFilesAfterEnv: ["@testing-library/jest-native/extend-expect"],
7+
setupFilesAfterEnv: ["@testing-library/jest-native/extend-expect", "./jest.setup.js"],
88
transform: {
99
"\\.(ts|tsx)$": [
1010
"ts-jest",

jest.setup.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// In CI, suppress the noisy, non-actionable "InteractionManager has been deprecated"
2+
// warning emitted during tests by @react-navigation/* internals and by
3+
// app/screens/transaction-history/transaction-history-screen.tsx, so Concourse/CI
4+
// logs stay readable. Locally the warning is left intact so developers still see
5+
// the deprecation. See https://github.com/blinkbitcoin/blink-mobile/issues/3813
6+
const isCI = Boolean(process.env.CI) && process.env.CI !== "false"
7+
8+
if (isCI) {
9+
const SUPPRESSED_WARNINGS = [/InteractionManager has been deprecated/]
10+
const originalWarn = console.warn.bind(console)
11+
console.warn = (...args) => {
12+
const message = typeof args[0] === "string" ? args[0] : ""
13+
if (SUPPRESSED_WARNINGS.some((re) => re.test(message))) return
14+
originalWarn(...args)
15+
}
16+
}

0 commit comments

Comments
 (0)