Mariusz Nowak b4a25d70d3 feat: Remove tab autocomplete feature
Reasoning:
- Performance is very poor due to slow command startup time
- `tabtab` package is no longer maintained and shares security issues
- Feature usage is relatively low (telemetry data shows 7% of users has the autocompletion on)

BREAKING CHANGE:
Opt-in tab-tab autocompletion feature is removed due to performance and security issues
2022-01-27 15:21:58 +01:00

24 lines
1.1 KiB
JavaScript

'use strict';
const { expect } = require('chai');
const renderCommandHelp = require('../../../../../lib/cli/render-help/command');
const commandsSchema = require('../../../../../lib/cli/commands-schema');
const observeOutput = require('@serverless/test/observe-output');
describe('test/unit/lib/cli/render-help/command.test.js', () => {
it('should show help', async () => {
const output = await observeOutput(() => renderCommandHelp('deploy'));
expect(output).to.have.string('deploy');
expect(output).to.have.string('deploy function');
expect(output).to.have.string('--help');
expect(output).to.have.string(commandsSchema.get('deploy').usage);
expect(output).to.have.string(commandsSchema.get('deploy function').usage);
});
it('should show help for container command', async () => {
const output = await observeOutput(() => renderCommandHelp('plugin'));
expect(output).to.have.string('plugin install');
expect(output).to.have.string(commandsSchema.get('plugin install').usage);
expect(output).to.have.string(commandsSchema.get('plugin uninstall').usage);
});
});