How to use the wechaty.Wechaty.VERSION function in wechaty

To help you get started, we’ve selected a few wechaty examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wechaty / wechaty-getting-started / tests / smoke-testing.js View on Github external
console.info('This CI test was activitated from Master Branch.')
    botList.push(
      new Wechaty({ puppet: 'wechaty-puppet-padchat' }),
      new Wechaty({ puppet: 'wechaty-puppet-padpro' }),
    )
  }

  try {
    for (const bot of botList) {
      const future = new Promise(resolve => bot.once('scan', resolve))
      await bot.start()
      await future
      await bot.stop()
      console.info(`Puppet ${bot.puppet} v${bot.puppet.version()} smoke testing passed.`)
    }
    console.info(`Wechaty v${Wechaty.VERSION} smoke testing passed.`)
  } catch (e) {
    console.error(e)
    // Error!
    return 1
  }
  return 0
}