Skip to content

Clean up console noise in core test suites #7750

@ggdouglas

Description

@ggdouglas

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)

    • findDOMNode deprecated
    • act(...) on Blueprint6.SliderHandle (mouse, touch, vertical variants)
  • test/context-menu/contextMenuTests.tsx (16 warnings)

    • findDOMNode deprecated
    • act(...) on Popper (all interaction tests: open, close, dismiss, theme, nesting)
  • test/tag-input/tagInputTests.tsx (10 warnings)

    • act(...) on Blueprint6.Icon (leftIcon render)
    • findDOMNode deprecated
    • act(...) on Blueprint6.TagInput (onAdd, onChange, onInputChange)

Tier 2: Moderate noise (3-9 warnings per suite)

  • test/controls/numericInputTests.tsx (9 warnings)

    • findDOMNode deprecated
    • [Blueprint] controlled value constraint warnings (intentional)
    • act(...) on Blueprint6.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)

    • findDOMNode deprecated
    • act(...) on Blueprint6.AsyncControllableInput
    • act(...) on Blueprint6.AsyncControllableTextArea
    • act(...) on TestComponent
  • test/overlay/overlayTests.tsx (3 warnings)

    • findDOMNode deprecated
    • Testing environment not configured to support act(...)
  • test/menu/menuItemTests.tsx (3 warnings)

    • findDOMNode deprecated
    • act(...) on Popper
    • act(...) on Blueprint6.Icon
  • test/dialog/dialogTests.tsx (3 warnings)

    • act(...) on Blueprint6.Icon
    • findDOMNode deprecated

Tier 3: Low noise (1-2 warnings per suite)

  • test/tree/treeTests.tsx (2) - findDOMNode, act(...) Icon
  • test/toast/toastTests.tsx (2) - act(...) on Blueprint6.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 prop spellcheck
  • 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 findDOMNode warnings stem from Enzyme internals. Migrating these tests to React Testing Library would eliminate them entirely.
  • The act(...) warnings on Popper are caused by react-popper state updates during Enzyme-based mount/interaction. Wrapping operations in act() 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 on console.warn and assert the warning was called, then restore.
  • The spellcheck DOM prop issue in editableTextTests is a genuine bug in the test or component (should use React's camelCase spellCheck).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions