Browse Source

Fix some errors in debugger tests

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
aea568b04a
  1. 2
      lib/_debugger.js
  2. 10
      test/simple/test-debugger-client.js

2
lib/_debugger.js

@ -108,7 +108,7 @@ function Client() {
this._reqCallbacks = [];
var socket = this;
this.currentFrame = 0;
this.currentFrame = NO_FRAME;
this.currentSourceLine = -1;
this.currentSource = null;
this.handles = {};

10
test/simple/test-debugger-client.js

@ -85,11 +85,13 @@ addTest(function (client, done) {
addTest(function (client, done) {
console.error("requesting scripts");
client.reqScripts(function (s) {
console.error("got %d scripts", s.length);
client.reqScripts(function () {
console.error("got %d scripts", Object.keys(client.scripts).length);
var foundMainScript = false;
for (var i = 0; i < s.length; i++) {
if (s[i].name === 'node.js') {
for (var k in client.scripts) {
var script = client.scripts[k];
if (script && script.name === 'node.js') {
foundMainScript = true;
break;
}

Loading…
Cancel
Save