Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
Regression test for #56 on GH
Browse files Browse the repository at this point in the history
When testing relative repository paths, we need to ensure that the set
breakpoint is hit when the script executes since v8 will accept
breakpoints in scripts that are not yet loaded masking an error in
selecting the correct script.

Fixes #56
  • Loading branch information
Matt Loring committed Jan 8, 2016
1 parent 60ea5a0 commit df8b6f6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion test/fixtures/a/hello.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
'use strict';
module.exports.hello = function() { console.log('hello world from a'); };
module.exports.hello = function() {
console.log('hello world from a');
};
11 changes: 8 additions & 3 deletions test/standalone/test-env-relative-repository-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ process.env.GCLOUD_DEBUG_REPO_APP_PATH = '/my/project/root';
var assert = require('assert');
var agent = require('../..');
var api;
var h = require('../fixtures/a/hello.js');

describe('repository relative paths', function() {

Expand All @@ -44,14 +45,18 @@ describe('repository relative paths', function() {
var bp = {
id: 0,
location: {
line: 1,
line: 3,
path: '/my/project/root/test/fixtures/a/hello.js'
}
};
api.set(bp, function(err) {
assert.ifError(err);
api.clear(bp);
done();
api.wait(bp, function(err) {
assert.ifError(err);
api.clear(bp);
done();
});
process.nextTick(function() { h.hello(); });
});
});

Expand Down

0 comments on commit df8b6f6

Please sign in to comment.