diff --git a/.playground/index.tsx b/.playground/index.tsx index 84e78a0349..2511c4c008 100644 --- a/.playground/index.tsx +++ b/.playground/index.tsx @@ -17,7 +17,7 @@ * under the License. */ -import 'core-js'; +// import 'core-js'; import React from 'react'; import ReactDOM from 'react-dom'; diff --git a/browsers/browsers.test.ts b/browsers/browsers.test.ts index 8369b2491d..17a57a24ad 100644 --- a/browsers/browsers.test.ts +++ b/browsers/browsers.test.ts @@ -56,10 +56,29 @@ describe('smoke tests', () => { } if (capabilities) { driver = await new webdriver.Builder().withCapabilities(capabilities).build(); + + await driver.executeScript(() => { + // @ts-ignore + window.browserErrors = []; + + window.console.error = (...args: any[]) => { + // @ts-ignore + window.browserErrors.push(...args); + }; + }); } }); afterAll(async() => { + const errors = await driver.executeScript(() => + // @ts-ignore + JSON.stringify(window.browserErrors) + // if (entry.level.name === 'error') { + // console.log('[%s] %s', entry.level.name, entry.message); + // } + ); + console.log('ERRRORS CLIENT', JSON.stringify(errors)); + await driver.quit(); }); diff --git a/src/components/chart.tsx b/src/components/chart.tsx index 22548e06e3..5b518e830b 100644 --- a/src/components/chart.tsx +++ b/src/components/chart.tsx @@ -68,6 +68,9 @@ export class Chart extends React.Component { this.chartContainerRef = createRef(); this.chartStageRef = createRef(); + // eslint-disable-next-line no-console + console.error('this thing errored'); + const id = props.id ?? uuid.v4(); const storeReducer = chartStoreReducer(id); const enhancers = typeof window !== 'undefined' && (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__