mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Disable 'package-that-throws-an-exception' except in spec that uses it
Loading this package logs a warning, so to minimize noise in the spec console, it should only be loaded when `console.warn` is mocked.
This commit is contained in:
@@ -19,6 +19,7 @@ describe "the `atom` global", ->
|
||||
expect(rootView.activatePackage).toHaveBeenCalled()
|
||||
|
||||
it "logs warning instead of throwing an exception if a package fails to load", ->
|
||||
config.set("core.disabledPackages", [])
|
||||
spyOn(console, "warn")
|
||||
expect(-> atom.loadPackage("package-that-throws-an-exception")).not.toThrow()
|
||||
expect(console.warn).toHaveBeenCalled()
|
||||
|
||||
@@ -35,6 +35,7 @@ beforeEach ->
|
||||
spyOn(config, 'save')
|
||||
config.set "editor.fontSize", 16
|
||||
config.set "editor.autoIndent", false
|
||||
config.set "core.disabledPackages", ["package-that-throws-an-exception"]
|
||||
|
||||
# make editor display updates synchronous
|
||||
spyOn(Editor.prototype, 'requestDisplayUpdate').andCallFake -> @updateDisplay()
|
||||
|
||||
Reference in New Issue
Block a user