Skip to content

Commit 9c6effb

Browse files
committed
Improve tests
1 parent 2e16084 commit 9c6effb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/deprecation.test.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ import { clearInstanceIdCounters, clearLog, Log, resetInstanceIdCounters,
55
traceLifecycle, VisualizerProvider } from '../src';
66

77
class Deprecated extends Component {
8-
state = {}
9-
108
render() {
119
this.trace('deprecated trace');
1210
return <this.LifecyclePanel/>;
1311
}
1412
}
1513
const TracedDeprecated = traceLifecycle(Deprecated);
1614

17-
const warnSpy = jest.spyOn(global.console, 'warn');
15+
// Override console.warn for this test file
16+
const warnSpy = jest.fn();
17+
console.warn = warnSpy; // eslint-disable-line no-console
1818

1919
let wrapper;
2020

0 commit comments

Comments
 (0)