Finish attach test
This commit is contained in:
Родитель
e26bb495a7
Коммит
05ba1784d7
|
@ -42,24 +42,21 @@ suite('WebKitDebugAdapter', () => {
|
|||
});
|
||||
|
||||
suite('attach()', () => {
|
||||
test('fail', done => done('failed!!!!'));
|
||||
test('if successful, an initialized event is fired', done => {
|
||||
test('if successful, an initialized event is fired', () => {
|
||||
const WebKitDebugAdapter: typeof _WebKitDebugAdapter = require(MODULE_UNDER_TEST).WebKitDebugAdapter;
|
||||
const wkda = new WebKitDebugAdapter();
|
||||
|
||||
let initializedFired = false;
|
||||
wkda.registerEventHandler((event: DebugProtocol.Event) => {
|
||||
if (event.type === 'initialize2') {
|
||||
if (event.event === 'initialized') {
|
||||
initializedFired = true;
|
||||
} else {
|
||||
assert.fail('An unexpected event was fired');
|
||||
}
|
||||
});
|
||||
|
||||
wkda.attach({ address: 'localhost', 'port': 9222 }).then(() => {
|
||||
if (initializedFired) {
|
||||
done();
|
||||
} else {
|
||||
return wkda.attach({ address: 'localhost', 'port': 9222 }).then(() => {
|
||||
if (!initializedFired) {
|
||||
assert.fail('Attach completed without firing the initialized event');
|
||||
}
|
||||
});
|
||||
|
|
|
@ -14,10 +14,6 @@ import * as NodeUrl from 'url';
|
|||
import * as Path from 'path';
|
||||
import * as Os from 'os';
|
||||
|
||||
class B {
|
||||
private _a = new A();
|
||||
}
|
||||
|
||||
interface IPendingBreakpoint {
|
||||
resolve: (response: SetBreakpointsResponseBody) => void;
|
||||
reject: (error?: any) => void;
|
||||
|
|
|
@ -11,10 +11,6 @@ import {AdapterProxy} from '../adapter/adapterProxy';
|
|||
import {LineNumberTransformer} from '../adapter/lineNumberTransformer';
|
||||
import {SourceMapTransformer} from '../adapter/sourceMaps/sourceMapTransformer';
|
||||
|
||||
class A {
|
||||
|
||||
}
|
||||
|
||||
export class WebKitDebugSession extends DebugSession {
|
||||
private _adapterProxy: AdapterProxy;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче