UNPKG

1.16 kBJavaScriptView Raw
1const expect = require('expect.js');
2const { DebugSession } = require('../src/debugger/lib/debug-session');
3const assert = require('assert')
4
5describe('DebugSession Core Test', function () {
6 describe('DebugSession input Test', function () {
7 it('should not pass Parmas', function () {
8 expect(function () {
9 new DebugSession();
10 }).to.throwException('Cannot read property indexOf of undefined')
11 })
12
13 })
14
15 describe('DebugSession output Test', function () {
16 it('should output ok', function () {
17 let write = {
18 fatal: function (data) {
19 return data
20 },
21 incomming: function (data) {
22 return data;
23 }
24 }
25 let onClose = function () {
26 return 'close'
27 }
28 let connector = function () {
29 return 'connector'
30 }
31 let debugSession = new DebugSession('127.0.0.1:8000', '00000', connector, write, onClose);
32 expect(debugSession.lastHttpResponse()).to.be(undefined);
33 })
34 })
35})
\No newline at end of file