This repository was archived by the owner on Jul 29, 2024. It is now read-only.
File tree 3 files changed +26
-2
lines changed
3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 1
1
var url = require ( 'url' ) ;
2
2
var util = require ( 'util' ) ;
3
+ var path = require ( 'path' ) ;
3
4
var webdriver = require ( 'selenium-webdriver' ) ;
4
5
5
6
var clientSideScripts = require ( './clientsidescripts.js' ) ;
@@ -658,3 +659,25 @@ exports.setInstance = function(ptor) {
658
659
exports . getInstance = function ( ) {
659
660
return instance ;
660
661
}
662
+
663
+ /**
664
+ * Utility function that filters a stack trace to be more readable. It removes
665
+ * Jasmine test frames and webdriver promise resolution.
666
+ * @param {string } text Original stack trace.
667
+ * @return {string }
668
+ */
669
+ exports . filterStackTrace = function ( text ) {
670
+ if ( ! text ) {
671
+ return text ;
672
+ }
673
+ var jasmineFilename = 'node_modules/minijasminenode/lib/jasmine-1.3.1.js' ;
674
+ var seleniumFilename = 'node_modules/selenium-webdriver' ;
675
+ var lines = [ ] ;
676
+ text . split ( / \n / ) . forEach ( function ( line ) {
677
+ if ( line . indexOf ( jasmineFilename ) == - 1 &&
678
+ line . indexOf ( seleniumFilename ) == - 1 ) {
679
+ lines . push ( line ) ;
680
+ }
681
+ } ) ;
682
+ return lines . join ( '\n' ) ;
683
+ }
Original file line number Diff line number Diff line change @@ -31,7 +31,8 @@ var config = {
31
31
jasmineNodeOpts : {
32
32
isVerbose : false ,
33
33
showColors : true ,
34
- includeStackTrace : true
34
+ includeStackTrace : true ,
35
+ stackFilter : protractor . filterStackTrace
35
36
}
36
37
}
37
38
Original file line number Diff line number Diff line change 13
13
"author" :
" Julie Ralph <[email protected] >" ,
14
14
"dependencies" : {
15
15
"selenium-webdriver" : " ~2.37.0" ,
16
- "minijasminenode" : " ~ 0.2.6 " ,
16
+ "minijasminenode" : " >= 0.2.7 " ,
17
17
"saucelabs" : " ~0.1.0" ,
18
18
"glob" : " >=3.1.14" ,
19
19
"adm-zip" : " >=0.4.2" ,
You can’t perform that action at this time.
0 commit comments