-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
Description
After migrating from Karma to Vitest (#7709), stderr output from tests is now visible and traceable per-test. There are 30 test suites producing 124 total warnings across 4 categories. This issue tracks cleaning them up suite by suite.
Warning types
| Warning | Count | Root cause |
|---|---|---|
act(...) - Popper |
34 | Enzyme + react-popper state updates not wrapped in act() |
findDOMNode deprecated |
26 | Enzyme internals using findDOMNode |
[Blueprint] validation |
18 | Intentional BP warnings emitted during expected test scenarios |
act(...) - Blueprint6.SliderHandle |
16 | Mouse/touch event handlers triggering async state updates |
act(...) - Blueprint6.TagInput |
9 | Input event handlers triggering async state updates |
act(...) - Blueprint6.Icon |
9 | Async icon loading triggering state updates |
act(...) env not configured |
3 | Overlay focus management timers |
act(...) - AsyncControllable* |
4 | Composition event handling in async inputs |
act(...) - Blueprint6.Toast |
2 | Toast timeout-based state updates |
act(...) - TestComponent |
2 | Test helper components with async updates |
Invalid DOM prop spellcheck |
1 | Should be spellCheck (React camelCase) |
Tier 1: High noise (10+ warnings per suite)
These suites produce the most output and should be prioritized.
-
test/slider/handleTests.tsx(17 warnings)findDOMNodedeprecatedact(...)onBlueprint6.SliderHandle(mouse, touch, vertical variants)
-
test/context-menu/contextMenuTests.tsx(16 warnings)findDOMNodedeprecatedact(...)onPopper(all interaction tests: open, close, dismiss, theme, nesting)
-
test/tag-input/tagInputTests.tsx(10 warnings)act(...)onBlueprint6.Icon(leftIcon render)findDOMNodedeprecatedact(...)onBlueprint6.TagInput(onAdd, onChange, onInputChange)
Tier 2: Moderate noise (3-9 warnings per suite)
-
test/controls/numericInputTests.tsx(9 warnings)findDOMNodedeprecated[Blueprint]controlled value constraint warnings (intentional)act(...)onBlueprint6.Icon[Blueprint]mutually exclusive props warning (intentional)
-
test/hooks/useHotkeysTests.tsx(8 warnings)[Blueprint]useHotkeys() used outside<HotkeysProvider>(8 tests, intentional)
-
test/forms/asyncControllableInputTests.tsx(7 warnings)findDOMNodedeprecatedact(...)onBlueprint6.AsyncControllableInputact(...)onBlueprint6.AsyncControllableTextAreaact(...)onTestComponent
-
test/overlay/overlayTests.tsx(3 warnings)findDOMNodedeprecated- Testing environment not configured to support
act(...)
-
test/menu/menuItemTests.tsx(3 warnings)findDOMNodedeprecatedact(...)onPopperact(...)onBlueprint6.Icon
-
test/dialog/dialogTests.tsx(3 warnings)act(...)onBlueprint6.IconfindDOMNodedeprecated
Tier 3: Low noise (1-2 warnings per suite)
-
test/tree/treeTests.tsx(2) -findDOMNode,act(...)Icon -
test/toast/toastTests.tsx(2) -act(...)onBlueprint6.Toast -
test/segmented-control/segmentedControlTests.tsx(2) -act(...)Icon,findDOMNode -
test/entity-title/entityTitleTests.tsx(2) -findDOMNode,act(...)Icon -
test/editable-text/editableTextTests.tsx(2) -findDOMNode, invalid DOM propspellcheck -
test/text/textTests.tsx(1) -findDOMNode -
test/tag/tagTests.tsx(1) -findDOMNode -
test/tag/compoundTagTests.tsx(1) -findDOMNode -
test/tabs/tabsTests.tsx(1) -findDOMNode -
test/slider/sliderTests.tsx(1) -findDOMNode -
test/slider/rangeSliderTests.tsx(1) -findDOMNode -
test/slider/multiSliderTests.tsx(1) -findDOMNode -
test/section/sectionTests.tsx(1) -act(...)Icon -
test/panel-stack/panelStackTests.tsx(1) -findDOMNode -
test/overlay2/overlay2Tests.tsx(1) -[Blueprint]childRefs warning (intentional) -
test/multistep-dialog/multistepDialogTests.tsx(1) -findDOMNode -
test/icon/iconTests.tsx(1) -findDOMNode -
test/html-select/htmlSelectTests.tsx(1) -findDOMNode -
test/forms/textAreaTests.tsx(1) -findDOMNode -
test/forms/fileInputTests.tsx(1) -findDOMNode -
test/drawer/drawerTests.tsx(1) -findDOMNode
Notes
- Many
findDOMNodewarnings stem from Enzyme internals. Migrating these tests to React Testing Library would eliminate them entirely. - The
act(...)warnings on Popper are caused byreact-popperstate updates during Enzyme-based mount/interaction. Wrapping operations inact()or migrating to RTL should resolve them. [Blueprint]validation warnings are intentional console output from the library. For test suites that deliberately trigger these (e.g., numericInput bounds tests, useHotkeys without provider), the fix is to spy onconsole.warnand assert the warning was called, then restore.- The
spellcheckDOM prop issue in editableTextTests is a genuine bug in the test or component (should use React's camelCasespellCheck).
Reactions are currently unavailable