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

Commit

Permalink
feat(runner): support sourcemaps in spec files
Browse files Browse the repository at this point in the history
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
  • Loading branch information
chirayuk authored and juliemr committed May 23, 2014
1 parent 9bfd6b8 commit 8d46e21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,9 @@ Runner.prototype.setupGlobals_ = function(driver) {
global.$$ = browser.$$;
global.element = browser.element;
global.by = global.By = protractor.By;

// Enable sourcemap support for stack traces.
require('source-map-support').install();
};

/**
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"adm-zip": "0.4.4",
"optimist": "~0.6.0",
"q": "1.0.0",
"lodash": "~2.4.1"
"lodash": "~2.4.1",
"source-map-support": "~0.2.6"
},
"devDependencies": {
"expect.js": "~0.2.0",
Expand Down

0 comments on commit 8d46e21

Please sign in to comment.