/
githubmirror
/
atom
Обзор
Документация
Войти
/
githubmirror
/
atom
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
spec/keymap-extensions-spec.js
23 строки
736 B
Sadick
Decaffeinate specs (#21546)
30 окт 2020, 16:40
Не верифицирован
30 окт 2020, 16:40
83d6c09
Код
Авторство
О чём код?
const temp = require('temp').track(); const fs = require('fs-plus'); describe('keymap-extensions', function() { beforeEach(function() { atom.keymaps.configDirPath = temp.path('atom-spec-keymap-ext'); fs.writeFileSync(atom.keymaps.getUserKeymapPath(), '#'); this.userKeymapLoaded = function() {}; atom.keymaps.onDidLoadUserKeymap(() => this.userKeymapLoaded()); }); afterEach(function() { fs.removeSync(atom.keymaps.configDirPath); atom.keymaps.destroy(); }); describe('did-load-user-keymap', () => it('fires when user keymap is loaded', function() { spyOn(this, 'userKeymapLoaded'); atom.keymaps.loadUserKeymap(); expect(this.userKeymapLoaded).toHaveBeenCalled(); })); });