Skip to content

Commit 39f80b3

Browse files
authored
chore: ignore the warning from setupTests in reanimated plugin (#820)
* fix: ignore the warning from setupTests * chore: add changeset
1 parent 9890400 commit 39f80b3

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.changeset/thick-pillows-act.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@callstack/repack": patch
3+
---
4+
5+
Ignore setUpTests warning from Reanimated by default

packages/plugin-reanimated/src/plugin.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,13 @@ export class ReanimatedPlugin implements RspackPluginInstance {
55
apply(compiler: Compiler) {
66
// add rules for transpiling wih reanimated loader
77
compiler.options.module.rules.push(reanimatedModuleRules);
8+
9+
// ignore the 'setUpTests' warning from reanimated which is not relevant
10+
compiler.options.ignoreWarnings = compiler.options.ignoreWarnings ?? [];
11+
compiler.options.ignoreWarnings.push((warning) =>
12+
/'`setUpTests` is available only in Jest environment\.'/.test(
13+
warning.message
14+
)
15+
);
816
}
917
}

0 commit comments

Comments
 (0)