mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
tests work again
This commit is contained in:
2
src/packages/autoflow/keymaps/autoflow.cson
Normal file
2
src/packages/autoflow/keymaps/autoflow.cson
Normal file
@@ -0,0 +1,2 @@
|
||||
'.editor':
|
||||
'alt-meta-q': 'autoflow:reflow-paragraph'
|
||||
@@ -1,7 +1,9 @@
|
||||
module.exports =
|
||||
activate: ->
|
||||
rootView.command 'autoflow:reflow-paragraph', '.editor', (e) =>
|
||||
@reflowParagraph(e.currentTargetView())
|
||||
rootView.eachEditor (editor) =>
|
||||
return unless editor.attached and editor.getPane()?
|
||||
editor.command 'autoflow:reflow-paragraph', (e) =>
|
||||
@reflowParagraph(e.currentTargetView())
|
||||
|
||||
reflowParagraph: (editor) ->
|
||||
if range = editor.getCurrentParagraphBufferRange()
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
RootView = require 'root-view'
|
||||
|
||||
describe "Autoflow package", ->
|
||||
fdescribe "Autoflow package", ->
|
||||
editor = null
|
||||
|
||||
beforeEach ->
|
||||
window.rootView = new RootView
|
||||
rootView.open()
|
||||
atom.activatePackage('autoflow')
|
||||
rootView.attachToDom()
|
||||
editor = rootView.getActiveView()
|
||||
|
||||
config.set('editor.preferredLineLength', 30)
|
||||
|
||||
describe "autoflow:reflow-paragraph", ->
|
||||
|
||||
Reference in New Issue
Block a user