mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 10:17:11 +03:00
Merge pull request #12925 from atom/as-fix-ci-failure
Return a `Disposable` when stubbing `observePreferredScrollbarStyle`
This commit is contained in:
commit
5078d27773
@ -1,6 +1,7 @@
|
||||
{ipcRenderer} = require 'electron'
|
||||
path = require 'path'
|
||||
temp = require('temp').track()
|
||||
{Disposable} = require 'event-kit'
|
||||
|
||||
describe "WorkspaceElement", ->
|
||||
describe "when the workspace element is focused", ->
|
||||
@ -17,9 +18,11 @@ describe "WorkspaceElement", ->
|
||||
it "has a class based on the style of the scrollbar", ->
|
||||
observeCallback = null
|
||||
scrollbarStyle = require 'scrollbar-style'
|
||||
spyOn(scrollbarStyle, 'observePreferredScrollbarStyle').andCallFake (cb) -> observeCallback = cb
|
||||
workspaceElement = atom.views.getView(atom.workspace)
|
||||
spyOn(scrollbarStyle, 'observePreferredScrollbarStyle').andCallFake (cb) ->
|
||||
observeCallback = cb
|
||||
new Disposable(->)
|
||||
|
||||
workspaceElement = atom.views.getView(atom.workspace)
|
||||
observeCallback('legacy')
|
||||
expect(workspaceElement.className).toMatch 'scrollbars-visible-always'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user