Remove log noise while running tests

This commit is contained in:
Corey Johnson
2013-01-31 15:14:47 -08:00
parent 30c7e8e2a5
commit 5d95d8bc4e
2 changed files with 3 additions and 2 deletions

View File

@@ -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", ->

View File

@@ -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,7 @@ describe "Snippets extension", ->
waitsFor "all snippets to load", 5000, -> snippets.loaded
runs ->
expect(console.warn).toHaveBeenCalledWith("Error reading snippets file '/Users/corey/github/atom/spec/fixtures/packages/package-with-snippets/snippets/junk-file'")
expect(Worker.prototype.terminate).toHaveBeenCalled()
expect(Worker.prototype.terminate.calls.length).toBe 1