mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 10:17:11 +03:00
24 lines
666 B
CoffeeScript
24 lines
666 B
CoffeeScript
path = require 'path'
|
|
temp = require('temp').track()
|
|
CSON = require 'season'
|
|
fs = require 'fs-plus'
|
|
|
|
describe "keymap-extensions", ->
|
|
|
|
beforeEach ->
|
|
atom.keymaps.configDirPath = temp.path('atom-spec-keymap-ext')
|
|
fs.writeFileSync(atom.keymaps.getUserKeymapPath(), '#')
|
|
@userKeymapLoaded = ->
|
|
atom.keymaps.onDidLoadUserKeymap => @userKeymapLoaded()
|
|
|
|
afterEach ->
|
|
fs.removeSync(atom.keymaps.configDirPath)
|
|
atom.keymaps.destroy()
|
|
|
|
describe "did-load-user-keymap", ->
|
|
|
|
it "fires when user keymap is loaded", ->
|
|
spyOn(this, 'userKeymapLoaded')
|
|
atom.keymaps.loadUserKeymap()
|
|
expect(@userKeymapLoaded).toHaveBeenCalled()
|