diff --git a/spec/app/syntax-spec.coffee b/spec/app/syntax-spec.coffee index d15eb5c74..9660fcecb 100644 --- a/spec/app/syntax-spec.coffee +++ b/spec/app/syntax-spec.coffee @@ -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", -> diff --git a/src/packages/snippets/spec/snippets-spec.coffee b/src/packages/snippets/spec/snippets-spec.coffee index 046807746..39cd4d4c6 100644 --- a/src/packages/snippets/spec/snippets-spec.coffee +++ b/src/packages/snippets/spec/snippets-spec.coffee @@ -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