MCPcopy
hub / github.com/wechaty/wechaty / asyncErrorFunction

Function asyncErrorFunction

src/wechaty.spec.ts:164–175  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

162 })
163
164 const asyncErrorFunction = function () {
165 return new Promise<void>((resolve, reject) => {
166 setTimeout(function () {
167 reject(EXPECTED_ERROR)
168 }, 100)
169 // tslint ask resolve must be called,
170 // so write a falsy value, so that it never called
171 if (+new Date() < 0) {
172 resolve()
173 }
174 })
175 }
176
177 bot.on('message', async () => {
178 await asyncErrorFunction()

Callers 1

wechaty.spec.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…