Path: blob/master/test/externalTests/complete.js
9427 views
const assert = require('assert')12module.exports = () => async (bot) => {3const matches = await bot.tabComplete('/weather ')4if (bot.supportFeature('tabCompleteHasAToolTip')) {5assert.deepStrictEqual(matches, [6{ match: 'clear', tooltip: undefined },7{ match: 'rain', tooltip: undefined },8{ match: 'thunder', tooltip: undefined }9])10} else if (bot.supportFeature('tabCompleteHasNoToolTip')) {11assert.deepStrictEqual(matches, [12'clear',13'rain',14'thunder'15])16}1718if (bot.supportFeature('tabCompleteHasNoToolTip')) {19const matches = await bot.tabComplete('/weather')20assert.deepStrictEqual(matches, ['/weather'])21}22}232425