Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 8d46e21

Browse files
chirayukjuliemr
authored andcommitted
feat(runner): support sourcemaps in spec files
This feature allows folks who are generating their spec files from a different language to see stack traces that use the line numbers from their sources before translation. This commit introduces a dependency on the `source-map-support` library. For general information about sourcemaps, refer: - http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/ - https://github.com/evanw/node-source-map-support - https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/view
1 parent 9bfd6b8 commit 8d46e21

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/runner.js

+3
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,9 @@ Runner.prototype.setupGlobals_ = function(driver) {
349349
global.$$ = browser.$$;
350350
global.element = browser.element;
351351
global.by = global.By = protractor.By;
352+
353+
// Enable sourcemap support for stack traces.
354+
require('source-map-support').install();
352355
};
353356

354357
/**

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"adm-zip": "0.4.4",
2121
"optimist": "~0.6.0",
2222
"q": "1.0.0",
23-
"lodash": "~2.4.1"
23+
"lodash": "~2.4.1",
24+
"source-map-support": "~0.2.6"
2425
},
2526
"devDependencies": {
2627
"expect.js": "~0.2.0",

0 commit comments

Comments
 (0)