mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-11 11:15:24 +03:00
Get TextEditorRegistry
specs passing
This commit is contained in:
parent
3c4493b895
commit
11e5a6176f
@ -5,6 +5,13 @@ const { Point, Range } = TextBuffer;
|
||||
const dedent = require('dedent');
|
||||
const NullGrammar = require('../src/null-grammar');
|
||||
|
||||
function setupLanguageMode (editor) {
|
||||
let languageMode = editor.getBuffer().getLanguageMode();
|
||||
languageMode.useAsyncParsing = false;
|
||||
languageMode.useAsyncIndent = false;
|
||||
return languageMode;
|
||||
}
|
||||
|
||||
describe('TextEditorRegistry', function() {
|
||||
let registry, editor, initialPackageActivation;
|
||||
|
||||
@ -298,8 +305,10 @@ describe('TextEditorRegistry', function() {
|
||||
await initialPackageActivation;
|
||||
await atom.packages.activatePackage('language-javascript');
|
||||
atom.grammars.assignLanguageMode(editor, 'source.js');
|
||||
let languageMode = setupLanguageMode(editor);
|
||||
atom.config.set('editor.tabType', 'auto');
|
||||
await initialPackageActivation;
|
||||
await languageMode.ready;
|
||||
|
||||
editor.setText(dedent`
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user