11// Copyright (c) Microsoft Corporation. All rights reserved.
22// Licensed under the MIT License.
33
4- // tslint:disable:no-multiline-string no-trailing-whitespace
4+ // tslint:disable:no-multiline-string no-trailing-whitespace max-func-body-length
55
66import { expect } from 'chai' ;
77import * as path from 'path' ;
88import * as TypeMoq from 'typemoq' ;
99import { Disposable , Uri , WorkspaceFolder } from 'vscode' ;
1010import { ICommandManager , IDocumentManager , IWorkspaceService } from '../../../client/common/application/types' ;
11+ import { noop } from '../../../client/common/core.utils' ;
1112import { IFileSystem , IPlatformService } from '../../../client/common/platform/types' ;
1213import { ITerminalService , ITerminalServiceFactory } from '../../../client/common/terminal/types' ;
1314import { IConfigurationService , IPythonSettings , ITerminalSettings } from '../../../client/common/types' ;
@@ -17,9 +18,7 @@ import { TerminalCodeExecutionProvider } from '../../../client/terminals/codeExe
1718import { ICodeExecutionService } from '../../../client/terminals/types' ;
1819import { PYTHON_PATH } from '../../common' ;
1920
20- // tslint:disable-next-line:max-func-body-length
2121suite ( 'Terminal - Code Execution' , ( ) => {
22- // tslint:disable-next-line:max-func-body-length
2322 [ 'Terminal Execution' , 'Repl Execution' , 'Django Execution' ] . forEach ( testSuiteName => {
2423 let terminalSettings : TypeMoq . IMock < ITerminalSettings > ;
2524 let terminalService : TypeMoq . IMock < ITerminalService > ;
@@ -46,7 +45,6 @@ suite('Terminal - Code Execution', () => {
4645 disposables = [ ] ;
4746 } ) ;
4847
49- // tslint:disable-next-line:max-func-body-length
5048 setup ( ( ) => {
5149 terminalFactory = TypeMoq . Mock . ofType < ITerminalServiceFactory > ( ) ;
5250 terminalSettings = TypeMoq . Mock . ofType < ITerminalSettings > ( ) ;
@@ -76,8 +74,7 @@ suite('Terminal - Code Execution', () => {
7674 case 'Django Execution' : {
7775 isDjangoRepl = true ;
7876 workspace . setup ( w => w . onDidChangeWorkspaceFolders ( TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) ) ) . returns ( ( ) => {
79- // tslint:disable-next-line:no-empty
80- return { dispose : ( ) => { } } ;
77+ return { dispose : noop } ;
8178 } ) ;
8279 executor = new DjangoShellCodeExecutionProvider ( terminalFactory . object , configService . object , workspace . object , documentManager . object ,
8380 platform . object , commandManager . object , fileSystem . object , disposables ) ;
@@ -119,7 +116,6 @@ suite('Terminal - Code Execution', () => {
119116 } ) ;
120117 } ) ;
121118
122- // tslint:disable-next-line:max-func-body-length
123119 suite ( testSuiteName , ( ) => {
124120 setup ( ( ) => {
125121 terminalFactory . setup ( f => f . getTerminalService ( TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) ) ) . returns ( ( ) => terminalService . object ) ;
@@ -323,8 +319,7 @@ suite('Terminal - Code Execution', () => {
323319 terminalService . setup ( t => t . onDidCloseTerminal ( TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) ) ) . returns ( ( callback => {
324320 closeTerminalCallback = callback ;
325321 return {
326- // tslint:disable-next-line:no-empty
327- dispose : ( ) => void 0
322+ dispose : noop
328323 } ;
329324 } ) ) ;
330325
0 commit comments