fix a few verbose reporter bugs
This commit is contained in:
parent
5d43eb2193
commit
09842c0539
@ -150,6 +150,8 @@ module Jasmine
|
||||
sleep 0.1
|
||||
end
|
||||
|
||||
Jasmine::Headless.warn "HTTP powered specs!"
|
||||
|
||||
yield
|
||||
|
||||
Thread.kill(server)
|
||||
|
19
vendor/assets/coffeescripts/prolog.coffee
vendored
19
vendor/assets/coffeescripts/prolog.coffee
vendored
@ -80,15 +80,18 @@ if window.JHW
|
||||
puts msg
|
||||
|
||||
JHW.createCoffeeScriptFileException = (e) ->
|
||||
if e and e.sourceURL and window.CoffeeScriptToFilename
|
||||
if e and e.sourceURL
|
||||
filename = e.sourceURL.split('/').pop()
|
||||
if realFilename = window.CoffeeScriptToFilename[filename]
|
||||
e = {
|
||||
name: e.name,
|
||||
message: e.message,
|
||||
lineNumber: "~" + String(e.line),
|
||||
sourceURL: realFilename
|
||||
}
|
||||
|
||||
e =
|
||||
name: e.name
|
||||
message: e.message
|
||||
sourceURL: e.sourceURL
|
||||
lineNumber: e.line
|
||||
|
||||
if window.CoffeeScriptToFilename and realFilename = window.CoffeeScriptToFilename[filename]
|
||||
e.sourceURL = realFilename
|
||||
e.lineNumber = "~" + String(e.line)
|
||||
|
||||
e
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
#= require jasmine.HeadlessReporter.ConsoleBase
|
||||
#
|
||||
class jasmine.HeadlessReporter.Verbose extends jasmine.HeadlessReporter.ConsoleBase
|
||||
@prereport = false
|
||||
|
||||
displaySuccess: (spec) =>
|
||||
this.displaySpec(spec, 'green')
|
||||
|
||||
@ -46,12 +48,17 @@ class jasmine.HeadlessReporter.Verbose extends jasmine.HeadlessReporter.ConsoleB
|
||||
colorLine: (line, color) =>
|
||||
line.foreground(color)
|
||||
|
||||
reportSpecStarting: (spec) =>
|
||||
if jasmine.HeadlessReporter.Verbose.prereport
|
||||
this.puts(spec.getSpecSplitName().join(' '))
|
||||
|
||||
reportException: (e) =>
|
||||
e = JHW.createCoffeeScriptFileException(e)
|
||||
|
||||
output = e.message
|
||||
if e.sourceURL && e.lineNumber
|
||||
output = "#{e.sourceURL}:~#{e.lineNumber} #{output}"
|
||||
output = "#{e.sourceURL}:#{e.lineNumber} #{e.message}"
|
||||
else
|
||||
output = e.message ? e
|
||||
|
||||
this.puts(output.foreground('yellow'))
|
||||
|
||||
|
18
vendor/assets/javascripts/prolog.js
vendored
18
vendor/assets/javascripts/prolog.js
vendored
@ -84,15 +84,17 @@
|
||||
};
|
||||
JHW.createCoffeeScriptFileException = function(e) {
|
||||
var filename, realFilename;
|
||||
if (e && e.sourceURL && window.CoffeeScriptToFilename) {
|
||||
if (e && e.sourceURL) {
|
||||
filename = e.sourceURL.split('/').pop();
|
||||
if (realFilename = window.CoffeeScriptToFilename[filename]) {
|
||||
e = {
|
||||
name: e.name,
|
||||
message: e.message,
|
||||
lineNumber: "~" + String(e.line),
|
||||
sourceURL: realFilename
|
||||
};
|
||||
e = {
|
||||
name: e.name,
|
||||
message: e.message,
|
||||
sourceURL: e.sourceURL,
|
||||
lineNumber: e.line
|
||||
};
|
||||
if (window.CoffeeScriptToFilename && (realFilename = window.CoffeeScriptToFilename[filename])) {
|
||||
e.sourceURL = realFilename;
|
||||
e.lineNumber = "~" + String(e.line);
|
||||
}
|
||||
}
|
||||
return e;
|
||||
|
Loading…
Reference in New Issue
Block a user