@@ -8,14 +8,13 @@ import { chromeConnection, ISourceMapPathOverrides, telemetry } from 'vscode-chr
88import * as mockery from 'mockery' ;
99import { EventEmitter } from 'events' ;
1010import * as assert from 'assert' ;
11- import { Mock , MockBehavior , It } from 'typemoq' ;
11+ import { Mock , MockBehavior , It , IMock , Times } from 'typemoq' ;
1212
1313import { getMockChromeConnectionApi , IMockChromeConnectionAPI } from './debugProtocolMocks' ;
1414import * as testUtils from './testUtils' ;
1515
1616/** Not mocked - use for type only */
1717import { ChromeDebugAdapter as _ChromeDebugAdapter } from '../src/chromeDebugAdapter' ;
18- import { StepProgressEventsEmitter } from 'vscode-chrome-debug-core/out/src/executionTimingsReporter' ;
1918
2019class MockChromeDebugSession {
2120 public sendEvent ( event : DebugProtocol . Event ) : void {
@@ -27,7 +26,7 @@ class MockChromeDebugSession {
2726
2827const MODULE_UNDER_TEST = '../src/chromeDebugAdapter' ;
2928suite ( 'ChromeDebugAdapter' , ( ) => {
30- let mockChromeConnection : Mock < chromeConnection . ChromeConnection > ;
29+ let mockChromeConnection : IMock < chromeConnection . ChromeConnection > ;
3130 let mockEventEmitter : EventEmitter ;
3231 let mockChrome : IMockChromeConnectionAPI ;
3332
@@ -44,21 +43,27 @@ suite('ChromeDebugAdapter', () => {
4443 mockEventEmitter = mockChrome . mockEventEmitter ;
4544 mockChromeConnection
4645 . setup ( x => x . api )
47- . returns ( ( ) => mockChrome . apiObjects ) ;
46+ . returns ( ( ) => mockChrome . apiObjects )
47+ . verifiable ( Times . atLeast ( 0 ) ) ;
4848 mockChromeConnection
4949 . setup ( x => x . attach ( It . isValue ( undefined ) , It . isAnyNumber ( ) , It . isValue ( undefined ) ) )
50- . returns ( ( ) => Promise . resolve ( ) ) ;
50+ . returns ( ( ) => Promise . resolve ( ) )
51+ . verifiable ( Times . atLeast ( 0 ) ) ;
5152 mockChromeConnection
5253 . setup ( x => x . isAttached )
53- . returns ( ( ) => false ) ;
54+ . returns ( ( ) => false )
55+ . verifiable ( Times . atLeast ( 0 ) ) ;
5456 mockChromeConnection
5557 . setup ( x => x . run ( ) )
56- . returns ( ( ) => Promise . resolve ( ) ) ;
58+ . returns ( ( ) => Promise . resolve ( ) )
59+ . verifiable ( Times . atLeast ( 0 ) ) ;
5760 mockChromeConnection
58- . setup ( x => x . onClose ( It . isAny ( ) ) ) ;
61+ . setup ( x => x . onClose ( It . isAny ( ) ) )
62+ . verifiable ( Times . atLeast ( 0 ) ) ;
5963 mockChromeConnection
6064 . setup ( x => x . events )
61- . returns ( x => new StepProgressEventsEmitter ( ) ) ;
65+ . returns ( x => null )
66+ . verifiable ( Times . atLeast ( 0 ) ) ;
6267
6368 // Instantiate the ChromeDebugAdapter, injecting the mock ChromeConnection
6469 const cDAClass : typeof _ChromeDebugAdapter = require ( MODULE_UNDER_TEST ) . ChromeDebugAdapter ;
0 commit comments