difftreelog
Hide unneeded websocker errors
in: master
1 file changed
tests/src/substrate/substrate-api.tsdiffbeforeafterboth22 settings = settings || defaultApiOptions();22 settings = settings || defaultApiOptions();23 let api: ApiPromise = new ApiPromise(settings);23 let api: ApiPromise = new ApiPromise(settings);2425 // TODO: Remove, this is temporary: Filter unneeded API output 26 // (Jaco promised it will be removed in the next version)27 const consoleErr = console.error;28 console.error = (message: string) => {29 if (message.includes("StorageChangeSet:: WebSocket is not connected") || message.includes("2021-")) {}30 else consoleErr(message);31 };243225 try {33 try {26 await promisifySubstrate(api, async () => {34 await promisifySubstrate(api, async () => {31 })();39 })();32 } finally {40 } finally {33 await api.disconnect();41 await api.disconnect();42 console.error = consoleErr;34 }43 }35}44}3645