<commit_before>/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

import minimist = require('minimist');
import { Application, Terminal, TerminalCommandId } from '../../../../automation/out';
import { afterSuite, beforeSuite } from '../../utils';
import { setup as setupTerminalEditorsTests } from './terminal-editors.test';
import { setup as setupTerminalPersistenceTests } from './terminal-persistence.test';
import { setup as setupTerminalProfileTests } from './terminal-profiles.test';
import { setup as setupTerminalTabsTests } from './terminal-tabs.test';

export function setup(opts: minimist.ParsedArgs) {
	describe('Terminal', () => {
		// TODO: Enable terminal tests for non-web when the desktop driver is moved to playwright
		if (!opts.web) {
			return;
		}

		beforeSuite(opts);
		afterSuite(opts);

		let terminal: Terminal;
		before(async function () {
			// Fetch terminal automation API
			const app = this.app as Application;
			terminal = app.workbench.terminal;<commit_msg>Setup terminal tests for 3 retries to minimize impact on build<commit_after>/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

import minimist = require('minimist');
import { Application, Terminal, TerminalCommandId } from '../../../../automation/out';
import { afterSuite, beforeSuite } from '../../utils';
import { setup as setupTerminalEditorsTests } from './terminal-editors.test';
import { setup as setupTerminalPersistenceTests } from './terminal-persistence.test';
import { setup as setupTerminalProfileTests } from './terminal-profiles.test';
import { setup as setupTerminalTabsTests } from './terminal-tabs.test';

export function setup(opts: minimist.ParsedArgs) {
	describe('Terminal', function () {
		// TODO: Enable terminal tests for non-web when the desktop driver is moved to playwright
		if (!opts.web) {
			return;
		}

		// Retry tests 3 times to minimize build failures due to any flakiness
		this.retries(3);

		beforeSuite(opts);
		afterSuite(opts);

		let terminal: Terminal;
		before(async function () {
			// Fetch terminal automation API
			const app = this.app as Application;
			terminal = app.workbench.terminal;
{'fraction_non_alphanumeric': 0.2366691015339664, 'fraction_numerical': 0.001095690284879474, 'mean_word_length': 2.2881152460984393, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7142171', 'n_tokens_mistral': 692, 'n_tokens_neox': 635, 'n_words': 223}