Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
f83efed9
Commit
f83efed9
authored
Jun 10, 2016
by
Ehtesham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
making karma logs cleaner by limiting stack trace and browser log
parent
6bc0fa2b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
2 deletions
+41
-2
common/static/common/js/jasmine_stack_trace.js
+28
-0
common/static/common/js/karma.common.conf.js
+13
-2
No files found.
common/static/common/js/jasmine_stack_trace.js
0 → 100644
View file @
f83efed9
/* This file overrides ExceptionFormatter of jasmine before it's initialization in karma-jasmine's
boot.js. It's important because ExceptionFormatter returns a constructor function. Once the method has been
initialized we can't override the ExceptionFormatter as Jasmine then uses the stored reference to the function */
(
function
()
{
/* globals jasmineRequire */
'use strict'
;
var
OldExceptionFormatter
=
jasmineRequire
.
ExceptionFormatter
(),
oldExceptionFormatter
=
new
OldExceptionFormatter
(),
MAX_STACK_TRACE_LINES
=
10
;
jasmineRequire
.
ExceptionFormatter
=
function
()
{
function
ExceptionFormatter
()
{
this
.
message
=
oldExceptionFormatter
.
message
;
this
.
stack
=
function
(
error
)
{
var
errorMsg
=
null
;
if
(
error
)
{
errorMsg
=
error
.
stack
.
split
(
'
\
n'
).
slice
(
0
,
MAX_STACK_TRACE_LINES
).
join
(
'
\
n'
);
}
return
errorMsg
;
};
}
return
ExceptionFormatter
;
};
}());
common/static/common/js/karma.common.conf.js
View file @
f83efed9
...
...
@@ -84,7 +84,7 @@ function junitNameFormatter(browser, result) {
* @return {String}
*/
function
junitClassNameFormatter
(
browser
)
{
return
"Javascript."
+
browser
.
name
.
split
(
" "
)[
0
];
return
'Javascript.'
+
browser
.
name
.
split
(
' '
)[
0
];
}
...
...
@@ -227,6 +227,7 @@ var getBaseConfig = function (config, useRequireJs) {
var
files
=
[
'node_modules/jquery/dist/jquery.js'
,
'node_modules/jasmine-core/lib/jasmine-core/jasmine.js'
,
'common/static/common/js/jasmine_stack_trace.js'
,
'node_modules/karma-jasmine/lib/boot.js'
,
'node_modules/karma-jasmine/lib/adapter.js'
,
'node_modules/jasmine-jquery/lib/jasmine-jquery.js'
...
...
@@ -292,6 +293,12 @@ var getBaseConfig = function (config, useRequireJs) {
// karma-reporter
reporters
:
reporters
(
config
),
// Spec Reporter configuration
specReporter
:
{
maxLogLines
:
5
,
showSpecTiming
:
true
},
coverageReporter
:
coverageSettings
(
config
),
...
...
@@ -330,7 +337,11 @@ var getBaseConfig = function (config, useRequireJs) {
// how many browser should be started simultaneous
concurrency
:
Infinity
,
browserNoActivityTimeout
:
50000
browserNoActivityTimeout
:
50000
,
client
:
{
captureConsole
:
false
}
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment