MCPcopy
hub / github.com/wechaty/wechaty / main

Function main

tests/fixtures/smoke-testing.ts:52–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50}
51
52async function main () {
53 if (VERSION === '0.0.0') {
54 throw new Error('VERSION not set!')
55 }
56
57 const botList = getBotList()
58 try {
59 await Promise.all(
60 botList.map(bot => bot.start()),
61 )
62 for (const bot of botList) {
63 console.info(`Wechaty v${bot.version()} smoking test passed.`)
64 console.info('listenerCount(message) is', bot.listenerCount('message'))
65 }
66 } catch (e) {
67 console.error(e)
68 // Error!
69 return 1
70 } finally {
71 await Promise.all(
72 botList.map(bot => bot.stop()),
73 )
74 }
75 return 0
76}
77
78main()
79 .then(process.exit)

Callers 1

smoke-testing.tsFile · 0.70

Calls 4

getBotListFunction · 0.85
versionMethod · 0.80
startMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…