mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Merge branch 'dev' into github-code-theme
This commit is contained in:
@@ -23,8 +23,7 @@ describe "the `syntax` global", ->
|
||||
expect(syntax.grammarForFilePath("/tmp/.git/config").name).toBe "Git Config"
|
||||
|
||||
it "uses plain text if no grammar can be found", ->
|
||||
filePath = require.resolve("this-is-not-a-real-file")
|
||||
expect(syntax.grammarForFilePath(filePath).name).toBe "Plain Text"
|
||||
expect(syntax.grammarForFilePath("this-is-not-a-real-file").name).toBe "Plain Text"
|
||||
|
||||
describe ".getProperty(scopeDescriptor)", ->
|
||||
it "returns the property with the most specific scope selector", ->
|
||||
|
||||
@@ -42,7 +42,7 @@ describe "TextMateTheme", ->
|
||||
selector: ".invalid.deprecated"
|
||||
properties:
|
||||
'color': "#D2A8A1"
|
||||
# 'font-style': 'italic'
|
||||
'font-style': 'italic'
|
||||
'text-decoration': 'underline'
|
||||
|
||||
expect(rulesets[13]).toEqual
|
||||
|
||||
@@ -85,7 +85,7 @@ jasmine.unspy = (object, methodName) ->
|
||||
throw new Error("Not a spy") unless object[methodName].originalValue?
|
||||
object[methodName] = object[methodName].originalValue
|
||||
|
||||
jasmine.getEnv().defaultTimeoutInterval = 500
|
||||
jasmine.getEnv().defaultTimeoutInterval = 1000
|
||||
|
||||
window.keyIdentifierForKey = (key) ->
|
||||
if key.length > 1 # named key
|
||||
|
||||
@@ -18,7 +18,7 @@ class EditSession
|
||||
if fs.exists(state.buffer)
|
||||
session = project.buildEditSessionForPath(state.buffer)
|
||||
else
|
||||
console.warn "Could not build edit session for path '#{state.buffer}' because that file no longer exists"
|
||||
console.warn "Could not build edit session for path '#{state.buffer}' because that file no longer exists" if state.buffer
|
||||
session = project.buildEditSessionForPath(null)
|
||||
session.setScrollTop(state.scrollTop)
|
||||
session.setScrollLeft(state.scrollLeft)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Task = require 'Task'
|
||||
Task = require 'task'
|
||||
|
||||
module.exports =
|
||||
class LoadTextMatePackagesTask extends Task
|
||||
|
||||
@@ -75,8 +75,8 @@ class TextMateTheme extends Theme
|
||||
|
||||
if fontStyle
|
||||
fontStyles = fontStyle.split(/\s+/)
|
||||
# properties['font-weight'] = 'bold' if _.contains(fontStyles, 'bold')
|
||||
# properties['font-style'] = 'italic' if _.contains(fontStyles, 'italic')
|
||||
properties['font-weight'] = 'bold' if _.contains(fontStyles, 'bold')
|
||||
properties['font-style'] = 'italic' if _.contains(fontStyles, 'italic')
|
||||
properties['text-decoration'] = 'underline' if _.contains(fontStyles, 'underline')
|
||||
|
||||
properties['color'] = @translateColor(foreground) if foreground
|
||||
|
||||
@@ -34,6 +34,7 @@ class CommandLoggerView extends ScrollView
|
||||
super
|
||||
|
||||
@command 'core:cancel', => @detach()
|
||||
@on 'blur', => @detach() unless document.activeElement is this[0]
|
||||
|
||||
toggle: (@eventLog={}) ->
|
||||
if @hasParent()
|
||||
@@ -180,8 +181,11 @@ class CommandLoggerView extends ScrollView
|
||||
@focus()
|
||||
|
||||
detach: ->
|
||||
super()
|
||||
return if @detaching
|
||||
@detaching = true
|
||||
super
|
||||
@rootView.focus()
|
||||
@detaching = false
|
||||
|
||||
serialize: ->
|
||||
eventLog: @eventLog
|
||||
|
||||
@@ -277,6 +277,7 @@ describe "Snippets extension", ->
|
||||
|
||||
it "terminates the worker when loading completes", ->
|
||||
jasmine.unspy(LoadSnippetsTask.prototype, 'loadAtomSnippets')
|
||||
spyOn(console, "warn")
|
||||
spyOn(Worker.prototype, 'terminate').andCallThrough()
|
||||
snippets.loaded = false
|
||||
snippets.loadAll()
|
||||
@@ -284,6 +285,8 @@ describe "Snippets extension", ->
|
||||
waitsFor "all snippets to load", 5000, -> snippets.loaded
|
||||
|
||||
runs ->
|
||||
expect(console.warn).toHaveBeenCalled()
|
||||
expect(console.warn.argsForCall[0]).toMatch /Error reading snippets file '.*?\/spec\/fixtures\/packages\/package-with-snippets\/snippets\/junk-file'/
|
||||
expect(Worker.prototype.terminate).toHaveBeenCalled()
|
||||
expect(Worker.prototype.terminate.calls.length).toBe 1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Task = require 'Task'
|
||||
Task = require 'task'
|
||||
TextMatePackage = require 'text-mate-package'
|
||||
|
||||
module.exports =
|
||||
|
||||
@@ -761,7 +761,7 @@ describe "TreeView", ->
|
||||
|
||||
expect(addDialog.miniEditor.getText().length).toBe 0
|
||||
|
||||
describe "tree-view:move", ->
|
||||
fdescribe "tree-view:move", ->
|
||||
describe "when a file is selected", ->
|
||||
moveDialog = null
|
||||
|
||||
@@ -770,6 +770,9 @@ describe "TreeView", ->
|
||||
treeView.trigger "tree-view:move"
|
||||
moveDialog = rootView.find(".tree-view-dialog").view()
|
||||
|
||||
afterEach ->
|
||||
waits 50 # The move specs cause too many false positives because of their async nature, so wait a little bit before we cleanup
|
||||
|
||||
it "opens a move dialog with the file's current path (excluding extension) populated", ->
|
||||
extension = fs.extension(filePath)
|
||||
fileNameWithoutExtension = fs.base(filePath, extension)
|
||||
|
||||
4
vendor/jasmine-console-reporter.js
vendored
4
vendor/jasmine-console-reporter.js
vendored
@@ -31,7 +31,9 @@ jasmine.ConsoleReporter.prototype.reportSpecResults = function(spec) {
|
||||
for (var i = 0; i < resultItems.length; i++) {
|
||||
var result = resultItems[i];
|
||||
if (this.logErrors && result.type == 'expect' && result.passed && !result.passed()) {
|
||||
console.log("ERROR: " + spec.getFullName())
|
||||
message = spec.getFullName()
|
||||
console.log("\n\n" + message)
|
||||
console.log((new Array(message.length + 1)).join('-'))
|
||||
if (result.trace.stack) {
|
||||
console.log(result.trace.stack)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user