@@ -11,57 +11,15 @@ import { DebugConfiguration } from '../../../lambda/local/debugConfiguration'
11
11
import * as localLambdaRunner from '../../../shared/codelens/localLambdaRunner'
12
12
import * as fs from '../../../shared/filesystem'
13
13
import * as fsUtils from '../../../shared/filesystemUtilities'
14
- import { Loggable , Logger } from '../../../shared/logger'
15
- import { TestLogger } from '../../../shared/loggerUtils'
16
14
import { ChildProcessResult } from '../../../shared/utilities/childProcess'
17
15
import { ExtensionDisposableFiles } from '../../../shared/utilities/disposableFiles'
18
- import { ChannelLogger } from '../../../shared/utilities/vsCodeUtils'
19
16
import { FakeExtensionContext } from '../../fakeExtensionContext'
17
+ import { FakeChannelLogger } from '../fakeChannelLogger'
20
18
import { assertRejects } from '../utilities/assertUtils'
21
19
22
- class FakeChannelLogger implements Pick < ChannelLogger , 'info' | 'error' | 'logger' > {
23
- public readonly loggedInfoKeys : Set < string > = new Set < string > ( )
24
- public readonly loggedErrorKeys : Set < string > = new Set < string > ( )
25
- public readonly logger : FakeLogger = new FakeLogger ( )
26
-
27
- public info ( nlsKey : string , nlsTemplate : string , ...templateTokens : Loggable [ ] ) : void {
28
- this . loggedInfoKeys . add ( nlsKey )
29
- }
30
-
31
- public error ( nlsKey : string , nlsTemplate : string , ...templateTokens : Loggable [ ] ) : void {
32
- this . loggedErrorKeys . add ( nlsKey )
33
- }
34
- }
35
-
36
- class FakeLogger implements Logger {
37
- public readonly loggedDebugEntries : Loggable [ ] = [ ]
38
-
39
- public debug ( ...message : Loggable [ ] ) : void {
40
- this . loggedDebugEntries . push ( ...message )
41
- }
42
-
43
- public verbose ( ...message : Loggable [ ] ) : void {
44
- throw new Error ( 'verbose() not used' )
45
- }
46
-
47
- public info ( ...message : Loggable [ ] ) : void {
48
- throw new Error ( 'info() not used' )
49
- }
50
-
51
- public warn ( ...message : Loggable [ ] ) : void {
52
- throw new Error ( 'warn() not used' )
53
- }
54
-
55
- public error ( ...message : Loggable [ ] ) : void {
56
- throw new Error ( 'error() not used' )
57
- }
58
- }
59
-
60
20
describe ( 'localLambdaRunner' , async ( ) => {
61
- let logger : TestLogger
62
21
let tempDir : string
63
22
before ( async ( ) => {
64
- logger = await TestLogger . createTestLogger ( )
65
23
await ExtensionDisposableFiles . initialize ( new FakeExtensionContext ( ) )
66
24
} )
67
25
@@ -73,10 +31,6 @@ describe('localLambdaRunner', async () => {
73
31
await del ( tempDir , { force : true } )
74
32
} )
75
33
76
- after ( async ( ) => {
77
- await logger . cleanupLogger ( )
78
- } )
79
-
80
34
describe ( 'attachDebugger' , async ( ) => {
81
35
let actualRetries : number = 0
82
36
let channelLogger : FakeChannelLogger
0 commit comments