diff --git a/Libraries/Components/TextInput/__tests__/TextInput-test.js b/Libraries/Components/TextInput/__tests__/TextInput-test.js index 7a6e6c5f54ffaa..0e28ffe05484b6 100644 --- a/Libraries/Components/TextInput/__tests__/TextInput-test.js +++ b/Libraries/Components/TextInput/__tests__/TextInput-test.js @@ -288,7 +288,7 @@ describe('TextInput compat with web', () => { 'aria-label': 'label', 'aria-labelledby': 'labelledby', 'aria-level': 3, - 'aria-live': 'polite', + // aria-live': 'polite', [TODO: https://github.com/facebook/react-native-deprecated-modules/pull/20] 'aria-modal': true, 'aria-multiline': true, 'aria-multiselectable': true, @@ -348,7 +348,6 @@ describe('TextInput compat with web', () => { aria-label="label" aria-labelledby="labelledby" aria-level={3} - aria-live="polite" aria-modal={true} aria-multiline={true} aria-multiselectable={true} diff --git a/jest/local-setup.js b/jest/local-setup.js index 4e753961140b44..e45e74a1e6965c 100644 --- a/jest/local-setup.js +++ b/jest/local-setup.js @@ -12,29 +12,22 @@ 'use strict'; +require('./setup'); + const consoleError = console.error; const consoleWarn = console.warn; -jest.spyOn(console, 'debug').mockImplementation(() => { - // Blackhole console output -}); - -jest.spyOn(console, 'info').mockImplementation(() => { - // Blackhole console output -}); +// Blackhole verbose console output +console.debug = jest.fn(); +console.info = jest.fn(); +console.log = jest.fn(); -jest.spyOn(console, 'log').mockImplementation(() => { - // Blackhole console output -}); - -jest.spyOn(console, 'error').mockImplementation((...args) => { +console.error = (...args) => { consoleError(...args); - throw new Error('console.error() was called'); -}); + throw new Error('console.error() was called (see error above)'); +}; -jest.spyOn(console, 'warn').mockImplementation((...args) => { +console.warn = (...args) => { consoleWarn(...args); - throw new Error('console.warn() was called'); -}); - -require('./setup'); + throw new Error('console.warn() was called (see warning above)'); +};